package com.cursormanager { import flash.events.Event; import com.cursormanager.cursors.Cursor; public class CursorEvent extends Event { public static const CHANGE:String = "cursorchange"; public static const DEFAULT:String = "cursordefault"; public var cursor:Cursor; // data that the receiver can use to decide which cursor to change to public var cursorInfo:Object; public function CursorEvent( type:String, cursor:Cursor=null ) { super( type, true, false ); this.cursor = getCursor( cursor ); } private function getCursor( cursor:Cursor ):Cursor { switch ( type ) { case DEFAULT: cursor = new Cursor(); break; } return cursor; } } }