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:
Test the Triangle button:
That's working! Now follow the pattern to create Event Listeners for the other three buttons, plus the matching functions: