A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Timer

  1. #1
    Junior Member
    Join Date
    Mar 2002
    Posts
    6
    How can I stop on a frame for 5 sec and then continue?

    Can someone give me the code and explain?

    Tnx!


  2. #2
    Junior Member
    Join Date
    Mar 2002
    Posts
    10
    Hi!

    I'm about to do something like this VERY SOON and I intend to use the link below as a guide:

    http://actionscript.org/tutorials/in...ts/index.shtml

    Check it out and let me know if it helps.

    Cathy

  3. #3
    Junior Member
    Join Date
    Mar 2002
    Posts
    6
    I found what is was looking for at http://www.actionscript.org, and this code works fine.

    If you don't get your link to work try this:

    start = getTimer();
    while (start+5000>now) {
    now = getTimer();
    }

    I'm not so good at this... but tnx for the answer!

  4. #4
    [title goes here]
    Join Date
    Apr 2002
    Location
    usa
    Posts
    124
    this code:

    start = getTimer();
    while (start+5000>now) {
    now = getTimer();
    }

    .....is a problem
    flash executes this loop so fast that it generates an error message in the player since it thinks it is in an 'endless' loop.....even for a 1 sec interval

    not a good solution for 'delay' routine
    sticking this code in a onClipEvent(enterframe) event will work better since it only checks it....say.....12 times per sec

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