Navigating Frame Labels

Create The Actions

Now it's time to put it all together. Go to the first Keyframe in the actions layer and bring up the Actions window (the keyboard shortcut is F9).

We'll start with the event listener for bTriangle, calling the function playTriangle:

bTriangle.addEventListener(MouseEvent.CLICK,playTriangle);

Then we'll create the playTriangle function. Instead of the play method, we'll use gotoAndPlay, and specify the "triangle" frame label:

function playTriangle(e:MouseEvent):void{
    gotoAndPlay("triangle");
}

This is the build process as it happens:

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

Get Adobe Flash player

Test the Triangle button:

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

Get Adobe Flash player

That's working! Now follow the pattern to create Event Listeners for the other three buttons, plus the matching functions: