Creating A PLAY Button with ActionScript 3.0
Create the Button
Let's get your movie moving again!
- Draw a simple rectangle to function as a button, then Convert To Symbol
- Choose Button as the Type
- Don't forget to give the symbol an appropriate Name
With the button still selected, we will assign the instance name bPlay using the Properties window:
What’s an Instance Name? Remember, we can have multiple copies of the same button (or MovieClip) on the Stage at any time. Each copy is referred to as an “instance” of that object. In fact, if you look at the Properties window again, you’ll notice exactly that:
Among other things, ActionScript uses Instance Names to track different copies of an object. Therefore, each Instance Name must be unique. The instance name, not the symbol name, is what ActionScript is referring to in this code:
OK, enough of that! Let's test if it works: