ebook img

Building Adobe AIR Applications PDF

300 Pages·2017·5.74 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Building Adobe AIR Applications

® ® Building ADOBE AIR Applications Legal notices Legal notices For legal notices, see http://help.adobe.com/en_US/legalnotices/index.html. Last updated 5/16/2017 iii Contents Chapter 1: About Adobe AIR Chapter 2: Adobe AIR installation Installing Ad obe AIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Removing Ad obe AIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Installing and running the AIR sample applica tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Adobe AIR updat es . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Chapter 3: Working with the AIR APIs AIR-specific ActionScri pt 3.0 classes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Flash Player classes with AIR-specific functionalit y . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 AIR-specific Flex componen ts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Chapter 4: Adobe Flash Platform tools for AIR development I nstalling the AIR SDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Setting up the Fle x SDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Setting up extern al SDKs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Chapter 5: Creating your first AIR application Creating your first desktop Flex AIR application in F lash Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Creating your first desktop AIR application using Flash Prof essional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Create your first AIR application for Android in Flash Prof essional . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Creating your first AIR application f or iOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Create your first HTML-based AIR application with Dreamweav er . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Creating your first HTML-based AIR applica tion with the AIR SDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Creating your first desktop AIR application with the Fle x SDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Creating your first AIR application for Android with the Fle x SDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 Chapter 6: Developing AIR applications for the desktop Workflow for developing a desktop AIR applica tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 Setting desktop application propert ies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 Debugging a desktop AIR applica tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 Packaging a desktop AIR installa tion file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 Packaging a desktop native installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 Packaging a captive runtime bundle for desktop comput ers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 Distributing AIR packages for desktop comput ers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 Chapter 7: Developing AIR applications for mobile devices Setting up your development environmen t . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 Mobile application design considera tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Workflow for creating AIR applications for . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .mobile devic es 66 Setting mobile application propert ies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 Packaging a mobile AIR applica tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 Debugging a mobile AIR applicat ion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Last updated 5/16/2017 BUILDING ADOBE AIR APPLICATIONS iv Contents Installing AIR and AIR applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .on mobile devic es 104 Updating mobile AIR applicat ions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 Use push notifica tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 Chapter 8: Developing AIR applications for television devices AIR capabilities for TVs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 AIR for TV application design considera tions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 Workflow for developing an AIR for TV applica tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131 AIR for TV application descriptor propert ies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 133 Packaging an AIR for TV applica tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 Debugging AIR for TV applicat ions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138 Chapter 9: Using native extensions for Adobe AIR AIR Native Extension ( ANE) files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 Native extensions versus the NativeProcess ActionScr ipt class . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Native extensions versus ActionScript class librar ies (SWC files) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Supported device s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143 Supported device pr ofiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Task list for using a native ext ension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Declaring the extension in your application descript or file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144 Including the ANE file in your application’s library pa th . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 Packaging an application that uses native ext ensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145 Chapter 10: ActionScript compilers About the AIR command-line tools in the Fle x SDK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 Co mpiler setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 148 Compiling MXML and ActionScript source files f or AIR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 149 Compiling an AIR component or code library (Fle x) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150 Chapter 11: AIR Debug Launcher (ADL) A DL usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 A DL Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155 ADL exit and error co des . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 Chapter 12: AIR Developer Tool (ADT) ADT c ommands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 AD T option sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 ADT err or messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176 ADT environment var iables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180 Chapter 13: Signing AIR applications Digitally sig ning an AIR file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 Creating an unsigned AIR intermediate file with AD T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189 Signing an AIR intermediate file with AD T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Signing an updated version of an AIR applica tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190 Creating a self-signed certificate with AD T . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 Last updated 5/16/2017 BUILDING ADOBE AIR APPLICATIONS v Contents Chapter 14: AIR application descriptor files Application descripto r changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196 The application descriptor file structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 198 AIR application descriptor element s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199 Chapter 15: Device profiles Restricting target profiles in the application descripto r file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 Capabilities of different pr ofiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237 Chapter 16: AIR.SWF in-browser API Customizing the seamless install badge .swf . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 Using the badge.swf file to install an AIR applica tion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240 Loading the air .swf file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 Checking if the runt ime is installed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 Checking from a web page if an AIR applica tion is installed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244 Installing an AIR application from the brows er . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 Launching an installed AIR application from the brow ser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 Chapter 17: Updating AIR applications About updating applicat ions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 Presenting a custom application update user interfac e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250 Downloading an AIR file to the user’s comput er . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251 Checking to see if an application is running f or the first time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 Using the update framewor k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255 Chapter 18: Viewing Source Code Loading, configuring, and opening the Source View er . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267 Source Viewer user interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270 Chapter 19: Debugging with the AIR HTML Introspector About the AIR Introspect or . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 Loading the AIR Introspector c ode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 Inspecting an object in the Co nsole tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272 Configuring the AIR Introspect or . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 AIR Introspector interfac e . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 Using the AIR Introspector with content in a non-application sandbo x . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280 Chapter 20: Localizing AIR applications Localizing the application name and description in the AIR applicat ion installer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282 Localizing HTML content with the AIR HTML localization framewor k . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 283 Chapter 21: Path environment variables Setting the PATH on Linux and M ac OS using the Bash shell . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293 Setting the Path on Window s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294 Last updated 5/16/2017 1 Chapter 1: About Adobe AIR Adobe® AIR® is a multi-operating system, multi-screen runtime that allows you to leverage your web development skills to build and deploy rich Internet applications (RIAs) to the desktop and mobile devices. Desktop, television, and mobile AIR applications can be built with ActionScript 3.0 using Adobe® Flex and Adobe® Flash® (SWF based). Desktop AIR applications can also be built with HTML, JavaScript®, and Ajax (HTML based). You can find more information about getting started with and using Adobe AIR at the Adobe AIR Developer Connection (http://www.adobe.com/devnet/air/). AIR enables you to work in familiar environments, to leverage the tools and approaches you find most comfortable. By supporting Flash, Flex, HTML, JavaScript, and Ajax, you can build the best possible experience that meets your needs. For example, applications can be developed using one or a combination of the following technologies: (cid:129) Flash / Flex / ActionScript (cid:129) HTML / JavaScript / CSS / Ajax Users interact with AIR applications in the same way that they interact with native applications. The runtime is installed once on the user's computer or device, and then AIR applications are installed and run just like any other desktop application. (On iOS, a separate AIR runtime is not installed; each iOS AIR app is a stand-alone application.) The runtime provides a consistent cross-operating system platform and framework for deploying applications and therefore eliminates cross-browser testing by ensuring consistent functionality and interactions across desktops. Instead of developing for a specific operating system, you target the runtime, which has the following benefits: (cid:129) Applications developed for AIR run across multiple operating systems without any additional work by you. The runtime ensures consistent and predictable presentation and interactions across all the operating systems supported by AIR. (cid:129) Applications can be built faster by enabling you to leverage existing web technologies and design patterns. You can extend web-based applications to the desktop without learning traditional desktop development technologies or the complexity of native code. (cid:129) Application development is easier than using lower-level languages such as C and C++. You do not need to manage the complex, low-level APIs specific to each operating system. When developing applications for AIR, you can leverage a rich set of frameworks and APIs: (cid:129) APIs specific to AIR provided by the runtime and the AIR framework (cid:129) ActionScript APIs used in SWF files and Flex framework (as well as other ActionScript based libraries and frameworks) (cid:129) HTML, CSS, and JavaScript (cid:129) Most Ajax frameworks (cid:129) Native extensions for Adobe AIR, which provide ActionScript APIs that provide you access to platform-specific functionality programmed in native code. Native extensions can also provide access to legacy native code, and native code that provides higher performance. Last updated 5/16/2017 BUILDING ADOBE AIR APPLICATIONS 2 About Adobe AIR AIR dramatically changes how applications can be created, deployed, and experienced. You gain more creative control and can extend your Flash, Flex, HTML, and Ajax-based applications to the desktop, mobile devices, and televisions. For information about what is included in each new AIR update, see the Adobe AIR Release Notes (http://www.adobe.com/go/learn_air_relnotes_en). Last updated 5/16/2017 3 Chapter 2: Adobe AIR installation The Adobe® AIR® runtime allows you to run AIR applications. You can install the runtime in the following ways: (cid:129) By installing the runtime separately (without also installing an AIR application) (cid:129) By installing an AIR application for the first time through a web page installation “badge” (you are prompted to also install the runtime) (cid:129) By creating a custom installer that installs both your application and the runtime. You must get approval from Adobe to distribute the AIR runtime in this fashion. You can request approval on the Adobe runtime licensing page. Note that Adobe does not provide tools for building such an installer. Many third-party installer toolkits are available, however. (cid:129) By installing an AIR application that bundles AIR as a captive runtime. A captive runtime is used only by the bundling application. It is not used to run other AIR applications. Bundling the runtime is an option on Mac and Windows. On iOS, all applications include a bundled runtime. As of AIR 3.7, all Android applications include a bundled runtime by default (although you have the option of using a separate runtime). (cid:129) By setting up an AIR development environment such as the AIR SDK, Adobe® Flash® Builder™ , or the Adobe Flex® SDK (which includes the AIR command line development tools). The runtime included in the SDK is only used when debugging applications — it is not used to run installed AIR applications. The system requirements for installing AIR and running AIR applications are detailed here: Adobe AIR: System requirements (http://www.adobe.com/products/air/systemreqs/). Both the runtime installer and the AIR application installer create log files when they install, update, or remove AIR applications or the AIR runtime itself. You can consult these logs to help determine the cause of any installation problems. See Installation logs. Installing Adobe AIR To install or update the runtime, a user must have administrative privileges for the computer. Install the runtime on a Windows computer 1 Download the runtime installation file from http://get.adobe.com/air. 2 Double-click the runtime installation file. 3 In the installation window, follow the prompts to complete the installation. Install the runtime on a Mac computer 1 Download the runtime installation file from http://get.adobe.com/air. 2 Double-click runtime installation file. 3 In the installation window, follow the prompts to complete the installation. 4 If the Installer displays an Authenticate window, enter your Mac OS user name and password. Install the runtime on a Linux computer Note: At this time, AIR 2.7 and later are not supported on Linux. AIR applications deployed to Linux should continue to use the AIR 2.6 SDK. Last updated 5/16/2017 BUILDING ADOBE AIR APPLICATIONS 4 Adobe AIR installation Using the binary installer: 1 Locate the installation binary file from http://kb2.adobe.com/cps/853/cpsid_85304.html and download. 2 Set the file permissions so that the installer application can be executed. From a command line, you can set the file permissions with: chmod +x AdobeAIRInstaller.bin Some versions of Linux allow you to set the file permissions on the Properties dialog opened through a context menu. 3 Run the installer from the command line or by double-clicking the runtime installation file. 4 In the installation window, follow the prompts to complete the installation. Adobe AIR is installed as a native package. In other words, as rpm on an rpm based distribution and deb on a Debian distribution. Currently AIR does not support any other package format. Using the package installers: 1 Locate the AIR package file from http://kb2.adobe.com/cps/853/cpsid_85304.html. Download the rpm or Debian package, depending on which package format your system supports. 2 If needed, double-click AIR package file to install the package. You can also install from the command line: a On a Debian system: sudo dpkg -i <path to the package>/adobeair-2.0.0.xxxxx.deb b On an rpm-based system: sudo rpm -i <path to the package>/adobeair-2.0.0-xxxxx.i386.rpm Or, if you are updating an existing version (AIR 1.5.3 or later): sudo rpm -U <path to the package>/adobeair-2.0.0-xxxxx.i386.rpm Installing AIR 2 and AIR applications requires you to have administrator privileges on your computer. Adobe AIR is installed to the following location: /opt/Adobe AIR/Versions/1.0 AIR registers the mime-type "application/vnd.adobe.air-application-installer-package+zip", which means that .air files are of this mime-type and are therefore registered with the AIR runtime. Install the runtime on an Android device You can install the latest release of the AIR runtime from the Android Market. You can install development versions of the AIR runtime from a link on a web page or by using the ADT - installRuntime command. Only one version of the AIR runtime can be installed at a time; you cannot have both a release and a development version installed. See “ADT installRuntime command” on page 169 for more information. Install the runtime on an iOS device The necessary AIR runtime code is bundled with each application created for iPhone, iTouch, and iPad devices. You do not install a separate runtime component. More Help topics “AIR for iOS” on page 67 Last updated 5/16/2017 BUILDING ADOBE AIR APPLICATIONS 5 Adobe AIR installation Removing Adobe AIR Once you have installed the runtime, you can remove it using the following procedures. Remove the runtime on a Windows computer 1 In the Windows Start menu, select Settings > Control Panel. 2 Open the Programs, Programs and Features, or Add or Remove Programs control panel (depending on which version of Windows you are running). 3 Select “Adobe AIR” to remove the runtime. 4 Click the Change/Remove button. Remove the runtime on a Mac computer (cid:129) Double-click the “Adobe AIR Uninstaller”, which is located in the /Applications/Utilities folder. Remove the runtime on a Linux computer Do one of the following: (cid:129) Select the “Adobe AIR Uninstaller” command from the Applications menu. (cid:129) Run the AIR installer binary with the -uninstall option (cid:129) Remove the AIR packages (adobeair and adobecerts) with your package manager. Remove the runtime from an Android device 1 Open the Settings app on the device. 2 Tap the Adobe AIR entry under Applications > Manage Applications. 3 Tap the Uninstall button. You can also use the ADT -uninstallRuntime command. See “ADT uninstallRuntime command” on pag e170 for more information. Remove a bundled runtime To remove a captive bundled runtime, you must remove the application it is installed with. Note that captive runtimes are only used to run the installing application. Installing and running the AIR sample applications To install or update an AIR application, a user must have administrative privileges for the computer. Some sample applications are available that demonstrate AIR features. You can access and install them using the following instructions: 1 Download and run the AIR sample applications. The compiled applications as well as the source code are available. 2 To download and run a sample application, click the sample application Install Now button. You are prompted to install and run the application. Last updated 5/16/2017

Description:
Chapter 4: Adobe Flash Platform tools for AIR development. Installing the AIR SDK Creating your first AIR application for Android with the Flex SDK .
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.