In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

Mouse-Hided

Get Adobe Flash player
by tipein123 13 Feb 2011

    Tags

    3D
    Embed
/**
 * Copyright tipein123 ( http://wonderfl.net/user/tipein123 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/ly0v
 */

package {
    import flash.display.Sprite;
    import flash.events.*;
    import flash.ui.*;
    
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            var cursor:Sprite = new Sprite(); 
            cursor.graphics.beginFill(0x000000); 
            cursor.graphics.drawCircle(0,0,20); 
            cursor.graphics.endFill(); 
            addChild(cursor); 
 
            stage.addEventListener(MouseEvent.MOUSE_MOVE,redrawCursor); 
            Mouse.hide(); 
 
            function redrawCursor(event:MouseEvent):void 
            { 
                cursor.x = event.stageX; 
                cursor.y = event.stageY; 
            }
        }
    }
}