• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7. Adding Interactivity > Adding JavaScript to Extend Functionality

Adding JavaScript to Extend Functionality

JavaScript is a common coding language for interactivity on the Web and elsewhere. For example, ActionScript, Flash's coding language, is an implementation of JavaScript. As well, Macromedia Director MX 2004, has added JavaScript as a coding alternative to its native object-oriented language, Lingo. It should not come as any great surprise, then, to discover you can write your own JavaScript code to drive many of the interactive objects and features of this application, providing the movie is destined for playback through a browser.

To add JavaScript to a box or a button

1.
Open a movie and double-click the slide to which a button or box will be added.

The Edit View panel opens.

2.
Add a click box, button, or text entry box.

3.
Click the properties tab for your object and select the JavaScript option to determine what happens if the user clicks inside or outside of the box.

4.
Click the Change button (it has three dots).

The JavaScript dialog box opens.

5.
Enter the JavaScript into the text box.

6.
Click OK.

The JavaScript dialog box closes.

7.
Determine what happens, including using JavaScript, if the user clicks outside of the object.

8.
Click OK.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint