Simple Timeout Script

Since I focus on the application “appearing” to work well by informing the user as such and not trying to hog the machine’s resources (even though I claim I never focus on efficiency), I found a good script to help me time things accordingly. The use of callbacks in Flash only goes so far because since it’s single threaded, the Flash movie will not wait to process events in enough time to show the user what is going on… unless you force it too. Read on, but scroll to the bottom if you just want the code.

3 Replies to “Simple Timeout Script”

  1. I think I just wet my pants.
    This is amazing, I’ve been needing this kind of workaround for ever!

    Thanks

  2. Right on!

    generateTimeout(2, “laugh”, JesterXL);
    generateTimeout(2.5, “stopLaugh”, JesterXL);
    generateTimeout(3, “ahem”, JesterXL);
    generateTimeout(0, “giveHandTowel”, JesterXL.hand, “cotton”);

Comments are closed.