the following function doesn't appear to run its check every second, it
appears to check every minute. Maybe I'm wrong about that, but 60000 in
any conversion shouldn't be equal to 1 second--
checkMouse = setInterval(whereMouse,60000); //look at the mouse position
every second
I think here's a bug in the logic too -- if the mouse HAPPENS to be at
the same location when the check is made every 60000 mili's, you're
gonna get thrown back to the beginning even if you have been moving it
wildly for the previous 59999.
I think what you want to do is have a variable which tallies how many
times the function finds mouse in the same position and base your
decision to run back to the intro based on that number.
Just some ideas.
-brendan
-----Original Message-----
From: Tim Do [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 02, 2004 12:39 PM
To: CF-Talk
Subject: OT: ActionScript Help
Hello All,
Setting up touch screen kiosk need help with ActionScript in Flash MX.
Have
a screen saver script that records mouse movement, once the mouse stops
moving for a certain amount of time the play head goes to and plays an
intro
movie. The file seems to have a bug that appears randomly. At different
time
intervals the play-back-head jumps back to the intro movie when clicking
around in the kiosk. Have not isolated a time when the play-back-head
jumps
back to the intro movie.
Here is the script:
stop();
this.>
_global.mouseXPosition = _root._xmouse; //save mouse position to a
global
variable
_global.mouseYPosition = _root._ymouse;
//trace(mouseYPosition); //if you want to test it...
updateAfterEvent(); //reset
}
checkMouse = setInterval(whereMouse,60000); //look at the mouse position
every second
function whereMouse(){
oldMouseX = _global.mouseXPosition; // get the current mouse X position
for
this function
oldMouseY = _global.mouseYPosition; // get the current mouse Y position
for
this function
//trace(oldMouseX + ","+ oldMouseY); //just to test it
if(_root._xmouse==oldMouseX && _root._ymouse==oldMouseY){ //if the mouse
hasn't moved for a second....
gotoAndStop("Begin");
}
}
Thanks!
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

