AIR2.6 + Native Mouse Cursor

If you are trying to use the new native cursors in your AIR application and happen to see the following error you might want to try how I solved this problem:

VerifyError: Error #1014: Class flash.ui::MouseCursorData could not be found.

First things first: if you got until this point you probably have already the AIR 2.6 SDK hooked up with your FlashBuilder (if not, do so! 😉 ). Also you need to update your applications compiler settings and target the new SDK. You need to update the the -app.xml, too. Because they seemed to changed a lot with the schema of that file, it's best to create a new project and copy the contents to your -app.xml. You should see the new namespace at the very top http://ns.adobe.com/air/application/2.6.

If you did all this and try to use MouseCursorData (which is needed for native cursors to be working) or another class from the new SDK you might run into that VerifyError during runtime. The solution I came up after some trying is an additional compiler argument: -swf-version=11 . Add this in the project settings and you should be good. Then you have smooth custom cursors. Yeah! 🙂

One comment

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.