Thursday, July 29, 2010

How to get a custom cursor in an AIR Window

I was testing custom cursors in an AIR Window this past week and I found some strange behavior. If tried to change the default cursor in an AIR Window by calling :

CursorManager.setBusyCursor()

The cursor in the main WindowedApplication changed rather than the cursor in my AIR Window. So, how could I change just the cursor in my AIR Window. The answer is to use a lower case “cursorManager” on the Window. So, I needed to call:

myAIRWindow.cursorManager.setBusyCursor();


Source from http://butterfliesandbugs.wordpress.com/2008/09/04/how-to-get-a-custom-cursor-in-an-air-window/

2 comments:

Apollo said...

I hope you're fine. I represent a social games startup called White Rabbit (with personnel in Pakistan, Indonesia and Philippines) and we're looking to contractually add an AS3 client-side developer to our team for a period of 3 months (the contract can be renegotiated after that). While doing some research online, I came across your LinkedIn profile. Would you be interested in being part of our game development team on an offshore basis? If so, feel free to send in your resume and portfolio to baig[dot]hassan[at]gmail[dot]com.

To be exact, we're looking for someone who can sync with our team on a daily basis and gives a consistent hourly output for the time of that sync. If you think you fit the bill, I'd love to hear from you.

jemo said...

Cursor must bee initialized after window activating:

mywindow.open();
mywindow.cursorManager.setCursor(this.appCursor);

or

mywindow.activate(); mywindow.visible = true;
mywindow.cursorManager.setCursor(this.appCursor);