A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: How to get something to happen immediately with setInterval

  1. #1
    Senior Member
    Join Date
    Feb 2004
    Posts
    782

    How to get something to happen immediately with setInterval

    Hi,
    Using AS2. I'm using setInterval to spawn stuff and my interval is 5000 miliseconds. However, I want the first instance to happen immediately and not after 5 seconds. Can I get setInterval to do this?
    Flash Ninja Clan - Games and cartoons

  2. #2
    FK founder & general loiterer Flashkit's Avatar
    Join Date
    Feb 2000
    Location
    Sydney
    Posts
    1,149
    call the function the line above the set interval, then set interval will continue on
    Regards Mark Fennell - Flash Kit Founder, general loiterer
    -------------------------------
    I Hate Zombies - iPhone Game | markfennell.com

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