Simple Play Button Help
Hi, I'm really new to flash and I have just completed an animation. I would like to add a play button at the beginning of the animation that plays the whole thing through. My buttons name is playbutton_btn and all the animation starts on frame 2 (frame one is a blank frame in all layers but the actionscript on the button.) here is the code I have so far (in the first frame of the animation.
stop();
playbutton_btn.addEventListener(MouseEvent.CLICK, playit);
function playit(event:MouseEvent):void {
gotoAndPlay(2);
}
This is in the hope that it will stop when played and prompt the viewer with the play button screen and when clicked play the animation through to the finish.
I get the error:
1120: Access of undefined property playbutton_btn.
If anyone could give me a hand or point me in the right direction that would be great:).
Cheers.
