Designing BusyCursor’s or Custom BusyCursor’s.

There is default skin for BusyCursor and that skin is in the pakage mx.skins and .as file BusyCursor you can find them in your sdk’s

Now coming to desing BusyCursor:

Here we need to design our own Cursor Programmatically that is write a class which extends the Sprite Class  and use the Graphics class and with its methods, you can make your own Design for Cursor’r and finally include the skin in the App as a Style, with the Property busyCursor in the CursorManager Class.

<mx:Style>

CursorManager {

busyCursor: ClassReference(“NewBusyCursorSkin”);

}

Here NewBusyCursorSkin is the class which draws your skin[ contains code to draw] and include that class as below.And when including styles Programmatically we got use the ClassReference() method with the Class Name as the parameter.Above line shows it. To understand this post you need to know what is Sprite and Graphics Classes.

This image shows the Custom BusyCursor i have developed.

Custom BusyCursor.

Enjoy the Post. Stay tuned for the code.

10 Responses to “Designing BusyCursor’s or Custom BusyCursor’s.”

  1. Lijomon Says:

    Can you please send me the code for changing default Busycursor?

    Thanks in advance
    Lijomon

  2. Jamie Says:

    Have you confirmed that this works with the showBusyCursor property on RemoteObjects, HTTPServices etc.? When I tried to implement a custom class similarly to how you described Flex still uses the default skin for the built in busy cursor handling during service calls. However, when I explicitly call the setBusyCursor() method on the CursorManager my custom cursor displays just fine. Also, I can specify the busyCursorBackground stylel on the CursorManager selector in CSS and that works fine for service calls but Flex still uses the default mx.skins.halo class so the hour/minute hand that it draws are overlayed on my custom cursor background.

    Thanks,
    Jamie

  3. kumargandhi Says:

    yes it works just fine, you can draw your own cursor, with altering the hour/min hand heights. if you doubted it overlays then, clear all the graphics before writing the code for one , or write a class which extends programmatic skin and there you can clear all the graphics.

    regards,
    kumar.

  4. ajay kumar Says:

    Hi ,i have need of busy curson .gif images for flex. if u have or know any link from where i can download it. please tell me. i have really need.

    Thanks in advance.

  5. Lijomon Says:

    The below code will change the default busy cursor…

    CursorManager
    {
    busyCursor: ClassReference(“mx.skins.halo.BusyCursor”);
    busyCursorBackground: Embed(source=”assets/img/loading.swf”);
    }

  6. Flexation Says:

    Thanks Lijomon, thats exactly what I needed.
    It took me about 2 hours of searching to get the solution and it works perfectly.

  7. Custom BusyCursor Demo in Flex. « flex on blog - by kumar Says:

    [...] BusyCursor Demo in Flex. As some readers requested a demo on this post, so I am giving it here.Enjoy the [...]

  8. Heartburn Home Remedy Says:

    Not that I’m impressed a lot, but this is more than I expected when I found a link on Digg telling that the info is awesome. Thanks.

Leave a Reply