Macromedia studio 8-exploring studio 8 사용자 설명서
Add actions to frames 227
Add actions to frames
In this section, you will add a small amount of ActionScript to control how
the playhead moves through the Timeline of the
the playhead moves through the Timeline of the
slideShow
movie clip. By
adding
stop()
methods, you cause the playhead to stop and wait at
certain frames. Later you will add ActionScript code to make the playhead
move again.
move again.
To add the ActionScript code:
1.
In the Timeline, select Frame 1 of Layer 2.
2.
Select Modify > Timeline > Convert to Keyframes.
This adds a keyframe to the frame, so now there are keyframes in
Frames 1 and 2 of Layer 2.
Frames 1 and 2 of Layer 2.
3.
Select Frame 1 of Layer 2.
4.
Open the Actions panel (Window > Actions).
If the Actions panel is in Script Assist mode (you will see the text “To
add an item, double-click or drag the item to the Script window” and
will be unable to type in the Script window), click the Script Assist
button in the Actions panel to exit Script Assist mode.
add an item, double-click or drag the item to the Script window” and
will be unable to type in the Script window), click the Script Assist
button in the Actions panel to exit Script Assist mode.
5.
In the Actions panel, type the following ActionScript:
stop();
This code causes the playhead to stop playing the
slideShow
movie
clip whenever it reaches Frame 1. A small a appears in Frame 1 of
Layer 1 of the Timeline. This indicates that ActionScript is present in
that frame.
Layer 1 of the Timeline. This indicates that ActionScript is present in
that frame.
6.
In the Timeline, select Frame 20 of Layer 2.
7.
Select Modify > Timeline > Convert to Keyframes.
8.
Select Frame 20 of Layer 2.
9.
In the Actions panel, type the stop(); ActionScript.
10.
In the Timeline, select frame 40 of Layer 2.
11.
Select Modify > Timeline > Convert to Keyframes.
12.
Select frame 40 of Layer 2.
13.
In the Actions panel, type the stop(); ActionScript.
14.
In the Timeline, select frame 60 of Layer 2.
15.
Select Modify > Timeline > Convert to Keyframes.
000_ExploringStudio.book Page 227 Tuesday, August 30, 2005 9:30 AM