by Alex Liebert
Table of contents
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.
Adobe Animate CC
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:
- Launch Flash Professional CS6, and create a new project of the type AIR, AIR for Android, or AIR for iOS (see Figure 1).
Figure 1. Creating a new AIR project.
- Choose File > Publish Settings.
- Click the wrench icon next to Script for ActionScript Settings (see Figure 2).
Figure 2. Selecting ActionScript Settings.
- Click the Library Path tab.
- Click the Browse To Native Extension (ANE) File button (see Figure 3).
Figure 3. Selecting a Native Extension (ANE) File.
- Navigate to the directory that contains your native extension and select the ANE file.
- Click OK.
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:
- Adobe AIR Native Extensions List
- Building a native extension for iOS and Android
- Using the GameCenter Adobe AIR native extension for iOS
- Using the iAd Adobe AIR native extension for iOS
- Facebook, Twitter and Mail Adobe AIR Native Extension
- App Rating Adobe AIR Native Extension
- iOS In-App Purchase Adobe AIR Native Extension
- Android In-App Purchase Adobe AIR Native Extension
- iAd Adobe AIR iOS Native Extension
- GameCenter iOS Adobe AIR Native Extension
- AdMob for Android Adobe AIR Native Extension