Adobe
Products
Acrobat
Creative Cloud
Creative Suite
Digital Marketing Suite
Digital Publishing Suite
Elements
Photoshop
Touch Apps
Student and Teacher Editions
More products
Solutions
Digital marketing
Digital media
Education
Financial services
Government
Web Experience Management
More solutions
Learning Help Downloads Company
Buy
Home use for personal and home office
Education for students, educators, and staff
Business for small and medium businesses
Licensing programs for businesses, schools, and government
Special offers
Search
 
Info Sign in
Welcome,
My cart
My orders My Adobe
My Adobe
My orders
My information
My preferences
My products and services
Sign out
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out My orders My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Review and Checkout
Adobe Developer Connection / Adobe AIR Developer Center /

Using native extensions in Adobe Flash Professional CS6

by Alex Liebert

Alex Liebert
  • Milkman Games

Content

  • Acquiring native extension (ANE) files
  • Adding native extensions to a Flash Professional CS6 project
  • Implementing ActionScript code
  • Where to go from here

Created

4 June 2012

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
ActionScript Adobe AIR Android Flash Professional gaming iOS mobile

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.

 

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

Required products

  • Flash Professional (Download trial)

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.

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:

  • Adobe AIR Community Extensions List
  • Developing Android Native Extensions: A Beginner’s Guide
  • Using the GameCenter Adobe AIR native extension for iOS
  • Using the iAd Adobe AIR native extension for iOS
  • Using the AdMob Adobe AIR native extension for Android
  • Amazon In-App Purchase Adobe AIR Native Extension
  • 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

Creative Commons License
This work is licensed under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 Unported License.

More Like This

  • What's new in Adobe AIR 3
  • Installation and deployment options in Adobe AIR 3
  • Packaging Adobe AIR applications for the desktop
  • Using Flash Builder 4.5 to package applications for Google Android devices
  • Using Flash Builder 4.5 to package applications for BlackBerry Tablet OS devices
  • Introducing the Adobe AIR security model
  • Adobe AIR Marketplace FAQ
  • Getting started with Adobe AIR for Flex and ActionScript 3 developers
  • Ten tips for building better Adobe AIR applications
  • Uploading images from CameraRoll and CameraUI

Tutorials and samples

Tutorials

  • Using the iOS Simulator to test and debug AIR applications
  • Using the Amazon In-App Purchase Adobe AIR native extension for Android and Kindle Fire
  • Transferring data with AIR native extensions for iOS – Part 3
  • Exchanging Vector and Array objects between ActionScript 3 and C, C++, or Objective-C

Samples

  • Licensing Adobe AIR applications on Android
  • Using web fonts with Adobe AIR 2.5
  • Using Badger for Adobe AIR applications

AIR blogs

More
07/09/2012 Protected: Publishing Adobe AIR 3.0 for TV on Reference Devices
07/08/2012 Source Code: Adobe AIR 3.3 Retina Video Application
07/06/2012 Application specific File Storage on Adobe AIR based ios Application
07/04/2012 Recent Work - iPad/Android App: Inside My toyota

AIR Cookbooks

More
02/09/2012 Using Camera with a MediaContainer instead of VideoDisplay
01/20/2012 Skinnable Transform Tool
01/18/2012 Recording webcam video & audio in a flv file on local drive
12/12/2011 Date calculations using 'out-of-the-box' functions

Products

  • Acrobat
  • Creative Cloud
  • Creative Suite
  • Digital Marketing Suite
  • Digital Publishing Suite
  • Elements
  • Mobile Apps
  • Photoshop
  • Touch Apps
  • Student and Teacher Editions

Solutions

  • Digital marketing
  • Digital media
  • Web Experience Management

Industries

  • Education
  • Financial services
  • Government

Help

  • Product help centers
  • Orders and returns
  • Downloading and installing
  • My Adobe

Learning

  • Adobe Developer Connection
  • Adobe TV
  • Training and certification
  • Forums
  • Design Center

Ways to buy

  • For personal and home office
  • For students, educators, and staff
  • For small and medium businesses
  • For businesses, schools, and government
  • Special offers

Downloads

  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR
  • Adobe Shockwave Player

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2012 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy Policy and Cookies (Updated)

Ad Choices

Reviewed by TRUSTe: site privacy statement