Featured FLA
» Author: Nitin Tikhe
» Title: Cart
» Description: This Animation Tut is a fun and useful for kids below 15 years. Watch the Flag, Doors, Stick and Horse movements.
» More by Nitin Tikhe
Featured Site
» Posted in the Flash Kit Links section
» Title: Banana Swimwear
» Description: This is a banana swim wear interactive catalog we designed and animated in Flash
What the above code does is it sets an Interval as long as 100 milliseconds.
A function is declared inside the interval which stores the X and Y positions of the cursor to two variables mouseX and mouseY. This function is called every 100 milliseconds. _xmouse and _ymouse are two built-in properties through which we can get the position of the mouse pointer.
100 milliseconds is the time interval for which the two variables mouseX and mouseY will preserve the values of the cursor's X and Y positions as trapped by the recent call to the function.
These values will be compared with the current X and Y positions of the mouse pointer. If the difference is not equal to 0 it will indicate that the mouse has moved.