flash question time again
- Started
- Last post
- 3 Responses
- revolver
Can anyone tell me how to make my flash movie clip goto a certain frame after several minutes of inactivity from the user, much like a screensaver would?
- unknown0
check where the mouse is and if it is in the same place as the last time you checked then add 1 to a counter.... then if the counter reachs a specified number... you can be idle.
If the mouse position doesn't equal that then set the counter to 0
Easy!
- revolver0
thanks Engage
That makes sense, all I gota d o now is sort some code.
- unknown0
initialize your movie with
oldXmouse = -1
oldYmouse = -1
counter = 0
freeze =0then in your main procedure..
if (oldXmouse == _xmouse and oldYmouse== _ymouse) {
counter= counter + 1} else {
counter= 0
}oldXmouse = _xmouse;
oldYmouse = _ymouse;if (counter>=timeSpan) {
freeze=1
} else
{
freeze =0
}