MovieClip.onMouseMove( ) Event Handler

ActionScript for Flash MX: The Definitive Guide, 2nd Edition
By Colin Moock
Chapter 18.  ActionScript Language Reference
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( )



    ActionScript for Flash MX. The Definitive Guide
    ActionScript for Flash MX: The Definitive Guide, Second Edition
    ISBN: 059600396X
    EAN: 2147483647
    Year: 2002
    Pages: 780
    Authors: Colin Moock

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net