This
event handler calls the function every time the
mouse moves.
onMouseMove = function() {
This makes the cursor invisible when it is
over the movie clip area.
Mouse.hide();
my_mc._x = _root._xmouse;
my_mc._y = _root._ymouse;
The
function is defined so that the x and y co-ordinates
of the movie clip "my_mc"are made equal to
the x and y co-ordinates of the cursor on the
stage.
updateAfterEvent();
}
this "updateafterevent"
built in function, tells our function to refresh
the displayed position each time an event
is registered in this case our event is movement
of the mouse. This is independent of the
frame rate.
Note: updateafterevent() function only works inside
an onClipEvent() event handler. Also note the
updateafterevent () only functions effectively
with certain onclipevents (mouseMove, mouseUp,
mouseDown, KeyDown and KeyUp) mouse classes.
|