Creating A PLAY Button with ActionScript 3.0

Create the Button

Let's get your movie moving again!

  1. Draw a simple rectangle to function as a button, then Convert To Symbol
  2. Choose Button as the Type
  3. Don't forget to give the symbol an appropriate Name

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player

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:

Content on this page requires a newer version of Adobe Flash Player.

Get Adobe Flash player