Upload
jerome-arnold
View
212
Download
0
Embed Size (px)
Citation preview
What is Action Script
1. It is a programming language used in Flash2. It is a language derived from JavaScript3. It is an interactive language to control objects in Flash4. Examples of of Actions:
Frame Actions and Object Actions(e.g. button actions, movie actions)
Action Script command editor environment
Example of some basic commands of movie action
1. goto2. play3. stop
Edit an Action script
Step 1 Step 2click
Step 3click
Step 4
doubleclick
Here is the action script
An “a” in the frame indicates it contains a frame action
An Example (Bouncing Ball)
Different Objects in Flash
Movie
Graphic
Button
Click here to view the movie
Steps of making the bouncing ball
1. Create the ball and the floor in graphic symbol
2. Use the ball to make a movie called moving ball
3. Create the two buttons (play and stop)
4. Open a new document5. Create a layer called ball6. Open the library and drag the moving ball into the
scene7. Create a layer called buttons8. Open the library and drag the button into the scene
Step 9 Name the movie object Ball in the properties box
Click to edit the Action Script Choose Expert Mode
Remember to choose the Button (stop) to create actions
Step 10 Select the buttons layer, right click the Play button and select Actions
Right click and select Actions
Step 11 Click Actions Movie Control on Select Press
Type on(press) { Ball.Play(); }
Step 12 Select the buttons layer, right click the Stop button and select Actions
Right click and select Actions
Step 13 Click Actions Movie Control on Select Press
Type on(press) { Ball.Stop(); }