Flash – button (Actionscript 2)

button1
Here’s how you make a simple button to switch from one scene to another.

Make a new flash file (ACTIONSCRIPT 2)
Make a simple blue square
Put a keyframe in frame 25
Move the square to the other side of the stage
Motion tween it
Right click on frame 25
Select ‘actions’
Put a ‘stop’ into it (in Timeline Control)

Insert scene (to make scene 2)
Make a red circle (which travels the other way)
Put a keyframe in frame 25
Move the circle to the other side of the stage
Motion tween it
Right click on frame 25
Select ‘actions’
Put a ‘stop’ into it (in Timeline Control)

Go back to scene 1
Add a new layer
Call this layer ‘button’
Insert a BLANK KEYFRAME in frame 25
Make a Yellow circle in the bottom LEFT HAND side
Select the circle (with the selection tool)
Modify – convert to symbol
Choose BUTTON
RIGHT CLICK on the BUTTON
Choose ACTIONS
Click MOVIE CLIP CONTROL
DOUBLE CLICK – ‘on’
DOUBLE CLICK – ‘release’
Shift the cursor AFTER the curly brackets
Click TIMELINE CONTROL
DOUBLE CLICK – ‘play’
DOUBLE CLICK – ‘nextscene’

on (release) {play();
nextScene();
}

Go to scene 2
Select frame 1
RIGHT CLICK – choose ACTIONS
Click on Timeline Control
DOUBLE CLICK ‘play’

Make sure you SAVE before trying the movie out

NOW – make sure you know the key facts in the development of animation (See posts below)