View Single Post
Old 12-06-2012, 08:38 PM   PM User | #1
SlowCoder
New Coder

 
Join Date: May 2007
Posts: 46
Thanks: 5
Thanked 1 Time in 1 Post
SlowCoder is an unknown quantity at this point
Pausing while a function works ...

I've written a RollDice() function that animates the rolling of dice. The function uses setTimeout to call itself a number of times. A variable DiceRolling is true when the routine is running, and once complete, DiceRolling is set false.

I have other automated routines that need to run after the routine is completed.

What is the best way to "pause" my script until the RollDice routine has completed?
SlowCoder is offline   Reply With Quote