How do I get the play head to consecutively go through the timeline containing objects in 4 frames on the click of a button using actionscript 3
Asked
Active
Viewed 26 times
1 Answers
1
- Make sure that you have a keyframe at each frame.
- Frame one: add this script
stop(); yourButtonName.addEventListener(MouseEvent.CLICK, goToNextFrame); function goToNextFrame(e:Event):void { nextFrame(); }

Amy Blankenship
- 6,485
- 2
- 22
- 45
-
Okay, that's helpful but how do I get it to loop as in go back to first frame and continue – SoloWalker Dec 28 '15 at 22:23
-
1Compare currentFrame to totalFrames. If you're on the last frame, gotoAndStop(1) – Amy Blankenship Dec 28 '15 at 22:54