actionscript pause action problem.

  • Started
  • Last post
  • 1 Response
  • Bullitt

    Got a problem with a pause action Im using throughout a timeline.

    on the 1st frame I have this:
    function pause(){
    play();
    clearInterval(timer);
    };

    then on keyframes throughout were I want it to pause for a set time I have:
    stop();
    timer = setInterval(pause, 5000);

    I have a button which throughout I have play next frame and play.
    Problem I got is when I click on this button throughout, it now shortens the time it plays each pause script, Im guessing because its still playing the previous one????

    anyone know a way of fixing this??
    cheers!

  • acescence0

    setInterval will fire the pause function every 5 seconds until you clearInterval. if you want it to just fire once, use setTimeout instead.