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

Hour 1. Your First Look at ActionScript > Task: Your First Script

Task: Your First Script

1.
Create a new movie.

2.
Place three key frames in the movie by pressing F7 twotimes with the timeline selected.

3.
Use your Flash drawing skills to create different graphics on each frame. For example, you could place a 1 on the first frame, a 2 on the second frame, and a 3 on the third frame.

4.
Now if you run the movie by choosing Control, Test Movie, you will see the movie loop through the three frames.

5.
Return to the main timeline and select the second key frame. Press F2 to bring up the Actions panel.

6.
The left side of the Actions panel shows an expandable list of keywords. Find the stop keyword and double-click it. You will find it under Actions, Movie Control. Now the script window should contain one line that looks like this:

stop ();

7.
Close the Actions window and choose Control, Test Movie to run the movie again. You can also press Command+Return on the Mac or Control_Enter in Windows. It should show you frame 1, frame 2, and then stop. You'll never see frame 3.

ActionScript has taken control. You've created your first script and thwarted Flash's intentions of looping through all three frames.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


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