Jump to content


Stop and start


  • You cannot reply to this topic
3 replies to this topic

#1 Chroniq

    Young Padawan

  • Members
  • Pip
  • 8 posts
  • Location:Belgium (Brugge)

Posted 30 March 2008 - 10:45 AM

I made a movie in flash and I want it to stop at the end and play again when you press the "play again" button, but it just keeps looping. How do I do this?

#2 MyFlash13

    Young Padawan

  • Members
  • Pip
  • 209 posts
  • Gender:Male
  • Location:Toronto,Canada

Posted 30 March 2008 - 11:11 AM

I can tell you're new to Flash, welcome, man! Its pretty simple.

1. Click on the last frame of your movie, and bring up the "actions" panel (ctrl + 'f', I think)
2. Type in the following script without quotes:
stop ();

3. Click on your "play again" button and enter the following ActionScript:

 

on (release) {
	gotoAndPlay (1);
}

That's about it! Message me if you need more help :P

Edited by MyFlash13, 30 March 2008 - 11:14 AM.


#3 Chroniq

    Young Padawan

  • Members
  • Pip
  • 8 posts
  • Location:Belgium (Brugge)

Posted 31 March 2008 - 09:40 AM

Thank you !

Stopping the movie works, but where precisely do I put in the code for the button?

#4 Jay.

    Young Padawan

  • Members
  • Pip
  • 70 posts
  • Gender:Male
  • Location:Latinoamérica yeah!!!

Posted 12 April 2008 - 03:40 AM

click on your button and open actions pane (F9) at the bottom of the actions pane should be a little image of your button that's how you know you are typing the script in the button then just type the code:

on(release){
gotoAndPlay(1);
}

"(1)" is the frame you want that button to play, if you have let's say your movie in the 50th frame and you want to play the 27th frame then it's:
on(release){
gotoAndPlay(27);
}

hope it helps.
peace!

Edited by iceball, 12 April 2008 - 04:34 AM.






1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users