P. 1


|Views: 15|Likes:
Published by Ganesh Babu
Learn Macromedia Director...
Learn Macromedia Director...

More info:

Published by: Ganesh Babu on Aug 24, 2008
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





To make the navigation buttons function, you need to add scripts to the buttons. These scripts
should be attached to the button sprites, rather than to frames in the script channel. Your frame
scripts respond to exitFrame events. After you write the button scripts, they will respond to
mouse clicks.

You start by adding scripts to the button sprites in the start scene.

1In the Score, display frames 1 through 10.

2Right-click (Windows) or Control-click (Macintosh) the Animation button sprite in channel 3,
frames 1 through 10.
3In the context menu, select Script.
The Script window opens with a default handler entered:

on mouseUp me


4On the second line, type the following script:


You see the following result:

on mouseUp me


5In the Name text box at the top of the Script window, type GoAnim.

6Close the Script window, and save your movie.

This handler has three parts. The first line tells Director to trigger this handler when the user
clicks on the button sprite to which the script is attached. Specifically, the mouseUp event refers to
the action of releasing the mouse button after it has been pressed. This way the script does not
run until the user releases the mouse button when clicking.

The second line of the handler contains the same code as the previous script that you wrote. It
sends the playhead to the frame that contains the marker named Animation. The difference
between these two scripts is that this one performs its action based on a mouse click, not on
an exitFrame event.

Again, the word end on the last line tells Director that the script is finished.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->