4 June 2012
Experience building games for iOS or Android with Flash Professional and Adobe AIR will help you make the most of this article.
Additional required other products
With the introduction of the AIR 3 SDK, Adobe enabled third-party developers to extend the AIR platform with native code. This capability made AIR apps more competitive than ever before, because it enabled them to take advantage of great platform features, including like In-App Purchase, Facebook, iAd, GameCenter, and AdMob. With the recent release of Flash Professional CS6, you can integrate AIR native extensions into your applications with just a few clicks.
You can not use native extensions targeting the Android or iOS platforms in applications targeting AIR for desktop. If you try to use a native extension targeting a mobile platform in an application targeting AIR for the desktop, you will receive an error similar to this one: "Implementation for native extension XXX required by the application was not found for the target platform."
Native extensions for AIR are packaged as files with the .ane extension. Milkman Games provides commercial extensions for iOS, Android, and Amazon including Ratings, Facebook, Twitter, In-App Purchase, Game Center, AdMob, and other extensions. Adobe maintains a great list of community extensions for mobile, Windows, and Mac that you can explore on the Adobe AIR Developer Center’s Native extensions for Adobe AIR page.
Once you’ve downloaded your native extension, you’ll need to add it to your Flash Professional CS6 project.
Adobe AIR Native Extensions can work with AIR projects for Windows, Mac, iOS, or Android. You can integrate a native extension into your Flash Professional CS6 project with a few simple steps:
Native extensions include ActionScript APIs for interacting with native code. Once the ANE file has been included, these APIs will be available for code completion within Flash Professional. You can find step-by-step tutorials on implementing the iAd, GameCenter, and AdMob extensions at the Adobe AIR Developer Center.
When you’re done, just choose File > Publish and deploy your application to your target platform!
Now that you’re familiar with the basics of using native extensions in Flash Professional CS6, you can use the following links to explore the growing list of native extensions available for the AIR platform or learn how to start creating your own: