Table of Contents

MovieClip.onMouseMove( ) Event Handler Flash 6

handler executed when mouse pointer moves while the clip is on stageFlash 5; callback form introduced in
mc.onMouseMove()

onClipEvent (mouseMove) {
  statements
}

Description

The onMouseMove( ) event handler is the callback form (and more modern analogue) of the legacy onClipEvent (mouseMove) event handler. The onMouseMove( ) event handler is identical to the Mouse.onMouseMove( ) listener event, except that it allows for screen refreshes between frames via updateAfterEvent( ). It executes when mc is on stage and the mouse pointer moves. The MovieClip.onMouseMove( ) handler would be obsolete in Flash 6 if Mouse.onMouseMove( ) supported updateAfterEvent( ). For complete details, see Mouse.onMouseMove( ).

Example

// Callback form
_root.onMouseMove = function () {
  trace("The mouse moved");
}
   
// Flash 5-style onClipEvent() block placed directly on a movie clip instance
onClipEvent (mouseMove) {
  trace("The mouse moved");
}

See Also

Mouse.onMouseMove( ), MovieClip.onMouseDown( ), MovieClip.onMouseUp( )


Table of Contents