Requirements
Prerequisite knowledge
Experience building games for iOS or Android with Flash Professional and Adobe AIR will help you make the most of this article.
Required products
Adobe Animate CC
Additional required other products
In-App Purchase, iAd, Facebook, or other native extensions from Milkman Games
Community native extensions on Adobe Developer Connection
User level
Beginning

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."
 

 
Acquiring native extension (ANE) files

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.
 

 
Adding native extensions to a 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:
 
  1. 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.
Figure 1. Creating a new AIR project.
 
  1. Choose File > Publish Settings.
  2. Click the wrench icon next to Script for ActionScript Settings (see Figure 2).
Figure 2. Selecting ActionScript Settings.
Figure 2. Selecting ActionScript Settings.
 
  1. Click the Library Path tab.
  2. Click the Browse To Native Extension (ANE) File button (see Figure 3).
Figure 3. Selecting a Native Extension (ANE) File.
Figure 3. Selecting a Native Extension (ANE) File.
 
  1. Navigate to the directory that contains your native extension and select the ANE file.
  2. Click OK.

 
Implementing ActionScript code

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!
 

 
Where to go from here

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: