Flex BusyCursor Manager


 

Flex BusyCursor Manager

In this example we have discuss about setBusyCursor() method in the flex application. CursorManager are provide a method setBusyCursor() when your application is processing and user should wait for the processing completion.

In this example we have discuss about setBusyCursor() method in the flex application. CursorManager are provide a method setBusyCursor() when your application is processing and user should wait for the processing completion.

Flex setBusyCursor Example:-

In this example we have discuss about setBusyCursor() method in the flex application. CursorManager are provide a method setBusyCursor() when your application is processing and user should wait for the processing completion. The default busy cursor is animated clock.

Example:-

<?xml version="1.0"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">

<mx:Script>

<![CDATA[

import mx.managers.CursorManager;

import flash.events.*;

private function initImage(event:MouseEvent):void {

CursorManager.setBusyCursor();

img1.load("assets/t3.jpeg");

img2.load("assets/t3.jpeg");

img3.load("assets/t3.jpeg");

img4.load("assets/t3.jpeg");

img5.load("assets/t3.jpeg");

img6.load("assets/t3.jpeg");

img7.load("assets/t3.jpeg");

img8.load("assets/t3.jpeg");

img9.load("assets/t3.jpeg");

img10.load("assets/t3.jpeg");

}

private function loadComplete(event:Event):void {

CursorManager.removeBusyCursor();

}

]]>

</mx:Script>

<mx:Panel width="600" height="150" title="Busy Cursor Example">

<mx:VBox>

0

<mx:HBox>

<mx:Image id="img1" height="50" width="50" scaleContent="true" complete="loadComplete(event);"/>

<mx:Image id="img2" height="50" width="50" scaleContent="true" complete="loadComplete(event);"/>

1

<mx:Image id="img3" height="50" width="50" scaleContent="true" complete="loadComplete(event);"/>

<mx:Image id="img4" height="50" width="50" scaleContent="true" complete="loadComplete(event);"/>

<mx:Image id="img5" height="50" width="50" scaleContent="true" complete="loadComplete(event);"/>

2

<mx:Image id="img6" height="50" width="50" scaleContent="true" complete="loadComplete(event);"/>

<mx:Image id="img7" height="50" width="50" scaleContent="true" complete="loadComplete(event);"/>

<mx:Image id="img8" height="50" width="50" scaleContent="true" complete="loadComplete(event);"/>

3

<mx:Image id="img9" height="50" width="50" scaleContent="true" complete="loadComplete(event);"/>

<mx:Image id="img10" height="50" width="50" scaleContent="true" complete="loadComplete(event);"/>

</mx:HBox>

4

<mx:Button id="butt" label="Load Image" click="initImage(event);"/>

</mx:VBox>

</mx:Panel>

5

</mx:Application>

Output:-

6

Ads