A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: how to stop TIMER?

  1. #1
    Junior Member
    Join Date
    Nov 2010
    Posts
    3

    how to stop TIMER?

    How do i stop a TIMER? i want to stop it on click a I want to a add a button to start again

    ActionScript Code:
    var nextImagen:Timer = new Timer (5000);
    nextImagen.addEventListener (TimerEvent.TIMER, playNext);
    nextImagen.start();

    function playNext(event:TimerEvent):void
    {
    nextFrame();
    }

  2. #2
    Member
    Join Date
    Sep 2010
    Posts
    37
    nextImagen.stop();

    That's all. Then use nextImagen.start(); when you want to start again.
    Also you can use nextImagen.reset(); to reset the timer completely when you are done or whenever you feel like.

  3. #3
    Junior Member
    Join Date
    Nov 2010
    Posts
    3
    Thankyou very much!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center