Search

Custom Search
24
May
08

flex Busy Cursor

Flex defines a busy cursor that is used to indicate to the user that your application is processing, such as calling a remote server and waiting for a response. The default busy cursor is an animated clock.

The CursorManager has two static methods that can be used to control the busy cursor. The setBusy Cursor() method obviously displays the busy cursor, and the removeBusyCursor() method removes it from the cursor list.

The following example contains two Button controls; one shows the busy cursor and the other hides it:

 <?xml version="1.0"?>
 <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">       <mx:Script>
           <![CDATA[                 import mx.managers.CursorManager;            ]]>
      </mx:Script>       <mx:Button label="Show Busy Cursor" click="CursorManager.setBusyCursor()"/>
      <mx:Button label="Hide Busy Cursor" click="CursorManager.removeBusyCursor()"/>  </mx:Application>

When the busy cursor is shown, you can still interact with the entire application, unless you have disabled something such as a Panel and all its children. If you do not want the user to interact with your application when the busy cursor is showing, set the Application.application.enabled property to false.

Do you like this story?

Most Commented Posts

Get Adobe Flash playerPlugin by wpburn.com wordpress themes