Home Tutorial Flex Flex-components Flex BusyCursor Manager

 
 

Share on Google+Share on Google+
Flex BusyCursor Manager
Posted on: April 6, 2010 at 12:00 AM
Advertisement
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>

<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);"/>

<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);"/>

<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);"/>

<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>

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

</mx:VBox>

</mx:Panel>

</mx:Application>

Output:-

Advertisement

Related Tags for Flex BusyCursor Manager:


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: April 6, 2010

Recommend the tutorial

Advertisements Advertisements
 

 

 

DMCA.com