Part of Lesson Plan: Buttons 2: Dungeon
Activity Overview / Details
II. Build (or have already built) the first three frames, including the first Room frame.
A. Show the recommended sequence for creating and
scripting a button:
1. Create the button shape. Create text (if any)
on the button. Using the Selection Tool, select both the
shape and the text and hit Command-->G in order to Group them.
2. Control-->Click on the button to get the pop-up
menu, and drop down to Convert to Symbol.
3. Be sure you're creating a BUTTON, not a Movie Clip.
Give the button a descriptive name, such as "Start", and click OK.
4. Now, while you're still focused on the button (and
it's showing that in the Properties window), click on the
ActionScript Panel arrow (in the upper RH corner of the Properties
window). Enter your action scripting, sending your "Player"
to the correct frame you want it to lead to. For example:
on (release) {
gotoAndStop (4)
}
This means that when the Player clicks and releases on that button, they will be taken to Frame 4.
(Also attached is a description of basic Actionscripting in Flash, with links to a simple online resource.)
B. When ready to create the next frame in your sequence,
decide (referring to your Storyboard map)-- do you want to have the
same background in the next frame? For example, another room?
If so, you will select the next frame in both layers and do
Insert--> Timeline--> Keyframe. This allows you to
repeat the background and merely change the elements in the Content
layer.
If instead you want a blank screen for a whole new background
design, then select BLANK keyframe. This allows you to create a new
look, new scenery.
Materials / Resource
Basics of ActionScripting
[
Download
]
More on the STOP and ON commands




