These days I suddenly found that the traditional use of cursormanager. setcursor (...); set the cursor style will have a bad feeling.
 
 
 
Now you can use bitmapdata to implement this function, and the performance is much better. I don't want to explain it. On the source code, you know!
 
 
 
Cursor class:
 
 
 
 
  View code  
 
 
 
 Package  {  Import  Flash. display. Bitmap;  Import  Flash. display. bitmapdata;  Import  Flash. display. loader;  Import  Flash. Events. event; Import  Flash.net. URLRequest;  Import  Flash. UI. Mouse;  Import  Flash. UI. mousecursordata;  Public   Class  Cursor {  Private  VaR _ cursor: array;  Private  VaR Loader: loader;  Public Function cursor (cursor: array ){  This . Cursor = Cursor ;}  Public  Function get cursor (): Array {  Return  _ Cursor ;}  Public Function set cursor (value: array ): Void  {_ Cursor = Value;  If (_ Cursor & _ cursor. Length = 2) {Loader = New  Loader (); loader. contentloaderinfo. addeventlistener (event. Complete, oncomplete); loader. Load (  New URLRequest (_ cursor [1 ]) ;}}  Protected Function oncomplete (Event: Event ): Void  {Var cursordata: vector. <Bitmapdata> = New Vector. <bitmapdata>(); Cursordata .push(bitmap(event.tar get. Content). bitmapdata); var mousecursordata: mousecursordata = New  Mousecursordata (); mousecursordata. Data = Cursordata; mouse. registercursor (_ cursor [ 0 ], Mousecursordata); mouse. cursor = _ Cursor [0 ] ;}}}  
 
 
 
 
 
Call: input an array. The index 0 is the name of the cursor, and the index 1 is the image path of the cursor.
 
 
 
New cursor (["newcursor", config. cursor_blue]);