Mega Code Archive

 
Categories / Flex / Components
 

Create a default busy cursor at a higher priority level

<?xml version="1.0"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">     <mx:Script>          import mx.managers.CursorManager;     import mx.managers.CursorManagerPriority;     import flash.events.*;     private var cursorID:Number = 0;     private function initImage(event:MouseEvent):void {         cursorID=CursorManager.setCursor(StyleManager.getStyleDeclaration("CursorManager").getStyle("busyCursor"),CursorManagerPriority.HIGH);         image1.load("logo.JPG");     }     private function loadComplete(event:Event):void {         CursorManager.removeCursor(cursorID);     }        </mx:Script>     <mx:VBox>         <mx:Image id="image1" complete="loadComplete(event);"/>         <mx:Button id="myButton" label="Show" click="initImage(event);"/>     </mx:VBox> </mx:Application>