Skip to main content
September 15, 2009
Answered

How do I go back 5 frames?

  • September 15, 2009
  • 1 reply
  • 588 views

This is probably really simple but I don't know what I am doing.  I have two arrows, one to go back and one to go forwards.  They can move 5 frames either way - or go to the next or previous frame label - same thing.  I can't seem to get it to work.  Can anyone help me?

This topic has been closed for replies.
Correct answer Ned Murphy

What you should do is have those two buttons on one layer for the full length of your timeline so that they only have to have stuff assigned to them once.  If that is not an oprtion, then you should add event listeners for them in each frame that they appear, but you should still have an actions layer that extends the length of the timeline and contains the event handlers functions just once.

1 reply

Ned Murphy
Legend
September 15, 2009

You should be able to use something along the lines of...

gotoAndStop(currentFrame-5)

September 15, 2009

Thanks Ned,

that kind of works.  it does goto on the next button or goback on the back button but only on the first frame - where the script is.  do I put that same script on all the other frames?

Ned Murphy
Ned MurphyCorrect answer
Legend
September 15, 2009

What you should do is have those two buttons on one layer for the full length of your timeline so that they only have to have stuff assigned to them once.  If that is not an oprtion, then you should add event listeners for them in each frame that they appear, but you should still have an actions layer that extends the length of the timeline and contains the event handlers functions just once.