Skip to main content
Participant
October 24, 2006
Question

stop and play --mouse click

  • October 24, 2006
  • 6 replies
  • 336 views
hi
i want to have a movie clip in frame 1 and only when i click on the movie clip i want it to go to frame 20 and play--- can anyone tell me howww? pleaseeee
This topic has been closed for replies.

6 replies

Participant
October 24, 2006
thanks it works
Venian
Inspiring
October 24, 2006
write the following lines of code on frame one of the timeline in actionscript panel:

stop();
_root.yourmovieclip.onRelease = function() {
_root.gotoAndStop(20);
}

that should work if you replace the "yourmovieclip" with the instance name of your movieclip placed in frame one.
as i wrote here i use the gotoAndStop statement because i don't have a stop(); statement on frame 20 and the movie continues to play.
you could place a stop(); statement on frame 20 and use in the actionscript instead of the gotoAndStop(20); the gotoAndPlay(20); statement.

Suit yourself. If your movie finishes on frame 20 i recommend you use the first example i gave you.

Good luck.
Participant
October 24, 2006
no the cursor does not change nothing is happenning. only the movie clip is displayed. I think the stop action is the cause
Known Participant
October 24, 2006
When you test the movie, what happens? Does the cursor change when you hover over the MovieClip? Does anything happen when you click on the MovieClip?
Participant
October 24, 2006
it is not working still!!!!!
Known Participant
October 24, 2006
Inside of the MovieClip, create a layer called Actions and a layer called Labels. On frame 1 of the MovieClip, place a stop(); in frame one of the Actions layer. On frame 20 of the MovieClip, label frame 20 as "Start".

Back in the main timeline, you can add the below code (replace "MovieClipInstanceName" with the name of your MovieClip instance.)