Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c03/h01/mnt/55667/domains/blog.michaeljbowen.com/html/wp-settings.php on line 472

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c03/h01/mnt/55667/domains/blog.michaeljbowen.com/html/wp-settings.php on line 487

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c03/h01/mnt/55667/domains/blog.michaeljbowen.com/html/wp-settings.php on line 494

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c03/h01/mnt/55667/domains/blog.michaeljbowen.com/html/wp-settings.php on line 530

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c03/h01/mnt/55667/domains/blog.michaeljbowen.com/html/wp-includes/cache.php on line 103

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c03/h01/mnt/55667/domains/blog.michaeljbowen.com/html/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /nfs/c03/h01/mnt/55667/domains/blog.michaeljbowen.com/html/wp-includes/theme.php on line 623
michaeljbowen.com » How to use Flash CS 5.5, AIR 3.2, and Starling for iOS, iPhone, iPad
Home > Flash, iOS > How to use Flash CS 5.5, AIR 3.2, and Starling for iOS, iPhone, iPad

How to use Flash CS 5.5, AIR 3.2, and Starling for iOS, iPhone, iPad

March 10th, 2012

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:

  1. Overlay the AIR 3.2 SDK onto Flash CS 5.5
  2. Get your app to use the “direct” render mode, which is required by Starling
Here’s how.
Step One: Overlay the AIR 3.2 SDK onto Flash CS 5.5
Follow these steps

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
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.
  1. 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
  2. Look for the <renderMode> tag. Set the render mode to “direct” like so:
    <renderMode>direct</renderMode>
  3. 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.

Flash, iOS

  1. Donny
    March 13th, 2012 at 19:50 | #1

    Hi Michael,

    I’m certain I’ve set up Air3.2 correctly and using render mode direct. When the app is launched all I get is the stage, which I assume Starling is sitting behind. It works fine through the browser. Do you know of any other CS5.5 gotchas?

  2. March 13th, 2012 at 20:16 | #2

    Donny, maybe you can send me the source code for your test.
    Get my email address from the image at the bottom of my “About” page.

  3. Donny
    March 13th, 2012 at 20:38 | #3

    @admin
    Scrap that, I’ve now followed your overlay instructions rather than those detailed in the “Overlay Air SDK” Adobe document. Big thanks for listing those steps!

  4. March 13th, 2012 at 20:44 | #4

    OK, great. I’m glad your problems are solved.
    I couldn’t get Adobe’s recommended steps to work, either.

  5. Gegorge
    March 30th, 2012 at 21:44 | #5

    This solution is hilarious, and the only ive found so far thanks.

  6. Chris
    June 6th, 2012 at 14:00 | #6

    I get an error with CS5.5 on Windows XP. Unknown render mode. It won’t continue after that.

  1. March 12th, 2014 at 05:50 | #1