Search code examples
actionscript-3flash-cs6

Getting a button to shuffle through the timeline


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


Solution

    1. Make sure that you have a keyframe at each frame.
    2. Frame one: add this script
    stop();
    yourButtonName.addEventListener(MouseEvent.CLICK, goToNextFrame);
    function goToNextFrame(e:Event):void {
       nextFrame();
    }