Be a Supporter!

Question: Play Button Code

  • 154 Views
  • 0 Replies
New Topic Respond to this Topic
zhengman777
zhengman777
  • Member since: May. 20, 2006
  • Offline.
Forum Stats
Member
Level 08
Blank Slate
Question: Play Button Code 2010-02-20 21:41:47 Reply

Hello all. I've recently started animating with Flash (also a first post in a while in these forums), and right now I'm in the process of creating a simple play button for my animation.

I want the button (which is named simply "playbutton") to start jump to the 3rd frame and start playing the .swf.

This is the following code.

stop() : void;
on(release)
{
this.gotoAndPlay(3);
}

Unfortunately, when I test the movie, the preloader runs, and then the animation completely skips over the button and immediately starts playing the movie without waiting for the user to click the button.

I tried Googling various codes for doing this, but I couldn't find anything that worked.

Could someone help me? Thanks in advance!