Be a Supporter!
SFMF
SFMF
  • Member since: Oct. 7, 2007
  • Offline.
Forum Stats
Member
Level 21
Animator
Replay option? Dec. 14th, 2012 @ 04:07 PM Reply

So because I'm almost done my first animation after more than five years lurking around here on Newgrounds, I want to figure out how to make a replay button in my animation. I know how to jump back to the first frame, but I have multiple scenes.

Thank you all so much for your help.


The quieter you become, the more you can hear.

ReNaeNae
ReNaeNae
  • Member since: Sep. 1, 2004
  • Offline.
Forum Stats
Supporter
Level 29
Melancholy
Response to Replay option? Dec. 18th, 2012 @ 12:04 AM Reply

At 12/14/12 04:07 PM, SFMF wrote: So because I'm almost done my first animation after more than five years lurking around here on Newgrounds, I want to figure out how to make a replay button in my animation. I know how to jump back to the first frame, but I have multiple scenes.

Thank you all so much for your help.

This should actually be asked in the flash forum, but... use Frame Labels.

Make a keyframe where you want the movie to jump back to... then in the properties panel, give it a name (can't start with a number, no spaces or weird characters, so keep it simple... something like 'startHere' ...then add the code to the replay button:

on release {
gotoAndPlay ("startHere");
}

...that's for AS2, btw.

Carr77
Carr77
  • Member since: Nov. 9, 2009
  • Offline.
Forum Stats
Member
Level 06
Animator
Response to Replay option? Dec. 18th, 2012 @ 04:14 AM Reply

At 12/14/12 04:07 PM, SFMF wrote: So because I'm almost done my first animation after more than five years lurking around here on Newgrounds, I want to figure out how to make a replay button in my animation. I know how to jump back to the first frame, but I have multiple scenes.

Thank you all so much for your help.

If you're living in 2012 you'd want to use AS3. Make a movieclip and give it an instance name of "replaybutton".
Write this on the frame:

stop();
replaybutton.addEventListener(MouseEvent.CLICK,toreplay);
function toreplay(e:MouseEvent){
gotoAndPlay(1);
}

If you want it to go to another frame, change the number between "()" on the "gotoAndPlay"-line :)


Check out my flash animations, and games. I've also made some bad music, and art ;)

Damien
Damien
  • Member since: Mar. 12, 2006
  • Offline.
Forum Stats
Member
Level 30
Artist
Response to Replay option? Dec. 20th, 2012 @ 10:08 AM Reply

At 12/14/12 04:07 PM, SFMF wrote: So because I'm almost done my first animation after more than five years lurking around here on Newgrounds, I want to figure out how to make a replay button in my animation. I know how to jump back to the first frame, but I have multiple scenes.

Thank you all so much for your help.

Why do you have the same signature as me? This is disturbing.