xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx">
import mx.managers.CursorManager;
import mx.managers.CursorManagerPriority;
import flash.events.*;
// Define a variable to hold the cursor ID.
private var cursorID:Number = 0;
// Define event listener to display the busy cursor
// and to load the image.
private function initImage(event:MouseEvent):void {
// Set busy cursor.
cursorID = CursorManager.setCursor(styleManager.getStyleDeclaration("mx.managers.CursorManager").getStyle("busyCursor"),CursorManagerPriority.HIGH);
// Load large image.
image1.load("a.JPG");
}
// Define an event listener to remove the wait cursor.
private function loadComplete(event:Event):void {
CursorManager.removeCursor(cursorID);
}
complete="loadComplete(event);" />