Create a default busy cursor at a higher priority level : Cursor « Components « Flex






Create a default busy cursor at a higher priority level

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>

   
    
    
    
    
    
  








Related examples in the same category

1.Create Cursor for arrayCreate Cursor for array
2.Load cursor from URLLoad cursor from URL
3.Using showBusyCursor property for SWFLoaderUsing showBusyCursor property for SWFLoader
4.Creating and removing a cursorCreating and removing a cursor
5.Use CursorManager to set and remove cursorUse CursorManager to set and remove cursor
6.Use default busy cursorUse default busy cursor
7.Install and uninstall busy cursorInstall and uninstall busy cursor
8.Set and remove busy cursorSet and remove busy cursor
9.Use custom cursor from pngUse custom cursor from png
10.Remove cursor by idRemove cursor by id
11.Use CursorManager to load png file based cursorUse CursorManager to load png file based cursor
12.CursorManager DemoCursorManager Demo
13.Define Busy CursorDefine Busy Cursor
14.Show Busy Cursor by using ActionScriptShow Busy Cursor by using ActionScript
15.Show Busy Cursor for Image loading