I'm trying to have an interactive program time out. For
instance if no one uses it for 2 minutes it automatically resets
back to the begining. What actionscript would I use and where would
I place it. I want it to reset from anywhere in the program.
maybe you could use the attached code with some other code
(like an if statement if the mouse is not moving, or no clicks are
not the *answer*, but maybe will get you going in the right
If you declare (use the Number type) and maintain a scope to
the interval, you can clear it from anywhere (before the delay()
function, in this case). So any valid 'interacting' event could
clear the interval and restart it. Of course, all events would have
to do this, and you'd have to be careful never to double the
setInterval (setInterval twice or more without clearing it) - that
can cause mahem.