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

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.