package com.cursormanager.cursors { import com.cursormanager.cursors.Cursor; import flash.events.MouseEvent; public class GraphicCursor extends Cursor { protected override function initialize():void { draw(); stage.addEventListener( MouseEvent.MOUSE_MOVE, updateCursor ); updateCursor(); } protected override function finalize():void { stage.removeEventListener( MouseEvent.MOUSE_MOVE, updateCursor ); } protected function draw():void { throw new Error( "Method is abstract and must be overridden." ); } protected function updateCursor( event:MouseEvent=null ):void { x = stage.mouseX; y = stage.mouseY; } } }