-
Is there anyway I can create a timeout in actionscript that if a user doesn't interact with a flash piece for a given amount of time, that it will time out and restart.
Thanks in advance.
-
The only way I would know how to do that is through the GetTimer command.
What you would have to do is have every interactive element in your movie set a variable that notes the time of the interaction. Something like this:
On (Press, Release, Release Outside, Rollover, Rollout, Dragover, Dragout)
Set Variable: "/:clicktime" = GetTimer/1000
End On
Then, you'll need your main timeline (or some other MC) loop so it can constantly check /:clicktime and see how long it's been, like this:
Set Variable: "now" = GetTimer/1000
If (now > /:clicktime + 300)
[Do the timeout thing]
End If
That particular script will timeout after 300 seconds of no interaction.
-
juggernart
Well, this one is not exactly what you want, but its another way:
At the beginning of the movie start dragging (with lockcenter) an empty mc that stores its x and y position (which are the mousex and mousey) in variables.
Then in the maintimeline check every x seconds if the mouse has moved.
I could send you a little .fla that I just hacked down.
Send me an email if you want it
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|