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.

Advertisements

11 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. […] BusyCursor Demo in Flex. As some readers requested a demo on this post, so I am giving it here.Enjoy the […]

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

  9. Ian Bullock says:

    Note: you must enclose the SWF source in single quotes for valid CSS in Flex 3.

    put this in your CSS file

    CursorManager
    {
    busyCursor: Embed(‘custcurs.swf’);
    }

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: