How to use Flash CS 5.5, AIR 3.2, and Starling for iOS, iPhone, iPad
With the newly released AIR 3.2 SDK, you can take advantage of Stage3D and achieve (near) native performance on iOS devices. Â As an example, I get a steady 58 frames per second on an iPad 2 when rendering 400 Sprites with Starling (Sprite size: 81×140 pixels).
However, getting Flash ready to export to your iOS device and take advantage of Starling is a bit of a challenge. You need to overcome these two challenges:
- Overlay the AIR 3.2 SDK onto Flash CS 5.5
- Get your app to use the “direct” render mode, which is required by Starling
Here’s how.
Step Two: Get Flash to use the direct render mode in iOS
Starling requires a render mode of “direct.”
Unfortunately, Flash CS 5.5 doesn’t currently support the ability to choose this render mode when building for iOS.
See here: http://screencast.com/t/bJicMLHPevq
Unfortunately, Flash CS 5.5 doesn’t currently support the ability to choose this render mode when building for iOS.
See here: http://screencast.com/t/bJicMLHPevq
The solution is a bit of a hack.
You need to alter your app’s XML file and then make the file read only for PC, or locked on a Mac.
You need to alter your app’s XML file and then make the file read only for PC, or locked on a Mac.
- Open your Flash project’s XML file.
As an example, my FLA is called “starlingIpadTest.fla”, so the app XML file is called “starlingIpadTest-app.xml”.
See here:Â http://screencast.com/t/fwceyJ76iZ - Look for theÂ
tag. Set the render mode to “direct” like so: direct - Make the file read only (PC) or lock it (Mac).
That’s it!
You can now deploy your app and test it on your iPhone or iPad.