this worked for me
try it on a small new project and see, if it works, move it to the actual project. If it works in the small project and does not work in the actual, then there is another process which is reverting the cursor. In order to know put a break point in the adobes 'CursorManagerImpl' class at the removeAllCursors() and other remove methods to see.
Message was edited by: saisri2k2
1 person found this helpful
The two approached you used should work. I suspect surely you made mistakes..Well let me explain..
In the CSS style declaration below make sure you have assigned the correct relative. If you are getting any error saying that it could not resolve the path or namespace then it means that you have not assigned the image path correctly. Make sure it is given correctly.
Well coming to AS style of setting cursor manager . You have used systemManager with lower case for s and in the setStyle method you need to use the busyCursor instead of busy-cursor(similar to css).
styleManager.getStyleDeclaration("mx.managers.CursorManager").setStyle ("busy-cursor", busyImg); - wrong way of assigning.
StyleManager.getStyleDeclaration("mx.managers.CursorManager").setStyle ("busyCursor", busyImg); - correct way of assigning.
Observe the changes I made in bold letters.
Always remember when you are setting styles in AS using setStyle method you need to give the properties in the lower camel case but not as you give in the css. In css we can use any king of style (either word seperated by hyphen or lower camel case syntax)
Hope this is clear ..make these changes and check..
Thank you guys, so it was the setStyle argument - busyCursor which worked and not "busy-cursor" css style.
But "S"tyleManager is deprecated from later versions of Flex SDK, the new usage is "s"tyleManager, an implicit object that flex creates and makes it available during run-time.