First, prepare your custom cursor. e.g. mine is a ani file (recommend a cool site http://www.cursors-4u.com to download different kinds of cursor). Then convert your cursor file to swf, if the file is not swf and your cursor is animated one. OK, let me introduce the 3 ways below:
setCursor and removeCursor methods of CursorManager
Maybe you know setBusyCursor and removeBusyCursor methods of CursorManager, but setCursor and removeCursor are more flexible. you can prepare a custom class , representing and embedding a cursor swf, as a parameter of setCursor, just like:
[Embed(source="assets/hourglass.swf")] public var HourGlassAnimation:Class;
CursorManager.setCursor(HourGlassAnimation); CursorManager.removeCursor(CursorManager.currentCursorID);
style of CursorManager
it’s a easier way. CursorManager has a style called “busyCursor”. So what you should do is , changing to your own class at the begginning of application, e.g. in preinitialize event hanler of Application, like:
StyleManager.getStyleDeclaration(”CursorManager”).setStyle(”busyCursor”,myBusyCursor); //myBusyCursor is class, embedding cursor swf
CSS
i think CSS must be the easiest way.
CursorManager
{
busyCursor: Embed(”../libs/cur.swf”);
}
Put it in css file or whereever you like. no problem.