Author Archive: Vishesh Gupta

Fixing the ‘timestamp’ error when packaging an AIR app for desktop

Adobe Flash Builder

Adobe Flash Builder 4.7 is an Integrated Development Environment (IDE) for developing games and applications using ActionScript and Flex framework.

Error description

When packaging an AIR application for desktop, you might encounter an error- “Could not generate time-stamp: Remote host closed connection during handshake”.


This error occurs due to the presence of Java 6 in Flash Builder. Please follow the steps below to fix this error:


  1. Run Flash Builder with Java 7/8 by following the steps mentioned in the article Running Flash Builder with Java 7/8.
  2. Add the line below in the FlashBuilder.ini file in the installation directory of Flash Builder.


Run Flash Builder with Java 7/8 as mentioned in the article Running Flash Builder with Java 7/8.

Command Line/ Terminal

When packaging through command line (Windows) / Terminal (Mac), you need to set the Java version to 1.7 or 1.8 to avoid errors.

HSTS Support in Flash Player 23


By Vivek Negi

HSTS is an Internet Engineering Task Force (IEFT) standard that enforces the user-agents like browsers to use the secured HTTPS protocol for communication instead of the HTTP protocol. The HTPPS response header from a host may have a ‘Strict-Transport-Security’ (STS) header field, which requests the user-agent to always make subsequent requests to access that host using the HTTPS protocol only. Beginning with version 23, Flash Player supports the HSTS standard. Flash Player now acknowledges an STS header in the HTTPS responses received from the HSTS hosts.

HSTS support is particularly helpful in those Flash applications where an SWF calls another SWF (child) and this child SWF is located in an HSTS enabled host. When the parent SWF tries to access the child SWF, the host sends an STS header in the HTTPS response. This STS header is acknowledged by Flash Player. Therefore, all the subsequent requests for the child SWF by the parent SWF can be made only through the HTTPS protocol.

The figure below depicts a workflow of how the HSTS enabled hosts and the non-HSTS enabled hosts interact with the browsers and Flash Player.


In the figure above, the browser is loading a Flash application that has two SWFs ─ outer.swf denoting the parent SWF and inner.swf denoting its child SWF. The non-HSTS host doesn’t enforce the browser (user-agent) to use the secure protocol, that is, HTTPS. The workflow, as depicted in the figure above, when the browser accesses content from the HSTS enabled host is described below:

  1. The file container.html loads outer.swf in the HSTS Host (
  2. The browser sends out request #4 through the non-secure transport as the URI for outer.swf is specified with HTTP scheme in container.html.
  3. The browser receives a 301 Moved Permanently response from as the server is an HSTS host and stops communicating using the non-secure HTTP protocol.
  4. Browser now sends out request #6 through the secure HTTPS protocol based on the Location header field as shown in the response #5 301 Moved Permanently.
  5. Browser receives the response #7 200 OK and notes as a ‘Known HSTS Host’ as the response message has a Strict-Transport-Security (STS) header field. From this point onwards, any subsequent request to this host by the browser will be made using the HTTPS protocol.
  6. Browser passes the outer.swf stream to Flash Player with the response headers.
  7. Flash Player also notes as a ‘Known HSTS Host’.
  8. Flash Player loads outer.swf and runs ActionScript in it.
  9. outer.swf loads inner.swf using URLRequest with the parameter
  10. The earlier versions of Flash Player, in the absence of HSTS support, would have made the request through the unsecured HTTP protocol. Flash Player 23, however, sends request #11 through secure transport as is a ‘Known HSTS Host’.

HSTS support in Flash Player can be very useful in various aspects, but most importantly it makes Flash Player more secure than its previous versions.

How to provide video rotation information to ActionScript as metadata


By Jason Lee

Prior to Flash Player and AIR version 20, the Flash runtime does not correctly process the matrix field values in the Track Header Box and the Movie Header Box, as defined in the ISO specification ISO/IEC 14496-12:2008. As a result, in some instances, the user experiences an incorrectly resized and rotated video when the video is played back with Flash. The problem is particularly pronounced when playing videos that are recorded in portrait mode with old Android or iOS devices. This happens because these devices save video in landscape mode along with a matrix representing rotation transformation, when the users record the video in portrait mode.

Flash Player and AIR version 20 introduce a feature whereby video rotation meta-data is provided through ActionScript. This feature mitigates the problem discussed above by providing the video matrix information to ActionScript as a part of the meta-data object of the onMetaData event, an event handler of the NetStream object. This allows the ActionScript developers to render the video in the intended rotation matrix. It should be noted that the Flash Player engine does not automatically apply the video matrix information to the rendered video output, so as to avoid any resizing or rotation that is not intended by the ActionScript developer.


The ActionScript code example below shows how to apply the rotation matrix to the Video object.

Note: The example assumes that the video is recorded along a matrix representing 90° clockwise rotation.

var video:Video = new Video();
 var nc:NetConnection = new NetConnection();
 var ns:NetStream = new NetStream(nc);
 ns.client = {};
 ns.client.onMetaData = ns_onMetaData;
 ns.client.onCuePoint = ns_onCuePoint;
function ns_onMetaData(info:Object):void {
 video.x = 0,
 video.y = 0;
 video.width = info.width;
 video.height = info.height;
 varmatrix:Matrix = video.transform.matrix; // Read old transform matrix of video object.
 varoldSize:Point = new Point(video.width, video.height);
 varnewSize:Point = new Point(Math.abs(info.matrix.transformPoint(oldSize).x), Math.abs(info.matrix.transformPoint(oldSize).y));
 matrix.translate(-(oldSize.x / 2), -(oldSize.y / 2));
 if (info.hasOwnProperty("trackHeaderBoxMatrix"))
 matrix.concat(info.trackHeaderBoxMatrix[0]); // Apply the matrix of the Track Header Box of Video Track provided by this feature to video object.
 // trackHeaderBoxMatrix is an array of MatrixObject because there can be one or more video tracks.
 if (info.hasOwnProperty("movieHeaderBoxMatrix"))
 matrix.concat(info.movieHeaderBoxMatrix); // Apply the matrix of the Movie Header Box provided by this feature to video object.
 matrix.translate((newSize.x / 2), (newSize.y / 2));
 video.transform.matrix = matrix; // Set new matrix to transform matrix of Video object.
 function ns_onCuePoint(item:Object):void {

The feature works for NetStream objects using progressive download, which allows Flash runtime to download and directly parse a video file. However, this feature does not handle NetStream using RTMP or appendBytes, in which case, the matrix properties provided by this feature are not available. This feature provides the matrices for all file formats — MP4, M4V, F4V, and 3GPP in accordance with ISO specification ISO/IEC 14496-12:2008, when using progressive download. For all other file formats, such as FLV, the matrix properties provided by this feature are not available.

The matrix information provided by this feature can only be applied to an instance of the Video class. Therefore, with StageVideo, which uses GPU acceleration, for example, the matrix information is not applicable.

This feature introduces the following new properties of the object representing video meta-data, a parameter of onMetaData event handler:

  • Object.movieHeaderBoxMatrix: flash.geom.Matrix
  • Object.trackHeaderBoxMatrix: An array of flash.geom.MatrixtrackHeaderBoxMatrix is an array of MatrixObject because there can be one or more video tracks in a single video file.

If you are a Flash content developer and are having trouble getting a video to display in correct orientation, please try this new ActionScript functionality for handling video rotation meta-data.

Issues while downgrading from AIR 20 to a lower version on Mac OS X


By Eric Simenel

This tech note addresses the problems that you may face when attempting to downgrade from AIR version 20 to an older AIR version. Prior to AIR version 20, AIR was provided as a 32-bit Runtime dynamic Library for Mac OS X. However, with the release of AIR 20, only a 64-bit Runtime dynamic Library is provided on Mac OS X. See AIR 20 release notes for details.

Certain users who are running apps that require 32-bit ANEs may want to downgrade to a lower AIR version that supports a 32-bit Runtime dynamic Library. Prior to AIR 20, downgrading AIR to a previous version (let’s say AIR 19) is a simple process:

  1. Download AIR 19 runtime. For downloading any other versions, see Archived Adobe AIR SDK versions.
  2. Uninstall AIR 20 runtime. See Removing Adobe AIR for details.
  3. Install AIR 19 runtime. See Installing Adobe AIR for details.
  4. Run AIR Settings manager utility to disable further updates of the runtime.

However, these steps will not suffice when you are downgrading from AIR 20 to a previous AIR version as there are some additional steps required in this case. To meet this requirement, the additional steps or the solutions are explained below.

Downgrading from AIR 20

Starting with AIR 20, which is a now 64-bit Runtime (instead of the previous 32 bit AIR runtime), the process for downgrading is the same as mentioned above. But there are certain points, which require attention when attempting to downgrade.

After you install AIR 20, any previously installed AIR app using the Shared Runtime that is launched gets updated. So the app’s launcher code will now be a 64-bit binary. The previously used 32-bit launcher gets renamed with a ‘_32’ suffix.

Note: AIR Captive Runtime Apps are unaffected by this upgrade to AIR 20. See AIR 64-bit on Mac OS X for more details.


If you go back to a previous AIR version, for example, AIR 19, then after uninstalling AIR 20 and installing AIR 19, an attempt to launch the updated AIR app fails because the new 64-bit launcher is unable to find the 64-bit AIR Runtime.

This problem occurs only when attempting to downgrade to an older version.


You can use either of the three solutions to resolve this issue:

Solution 1: Move the application to the Trash, empty the Trash, and reinstall it from its .air package or custom installer as you did when you installed it the first time.

Solution 2: Rename the launchers at <AIR application>/Contents/MacOS/.

  1. For the launcher with no suffix, add a ‘_64’ suffix.
  2. For the launcher with the ‘_32’ suffix, remove this suffix.

Note: Here launcher refers to the name of your <AIR application>.

Solution 3: Edit the contents of the info.plist file so that its CFBundleExecutable key has the ‘_32’ suffix. The info.plist file is present at <AIR application>/Contents/.

Downgrading after an initial AIR 20 installation from a SideCar

There is another issue that a few users may face — specifically, those who install an AIR application with a SideCar AIR 20 installation; having never before installed an AIR shared runtime and then downgrading from AIR 20.

Note: An AIR SideCar Installation is one where an .air package is distributed alongside the AIR installer so that both AIR and this application are installed at the same time.

After an Initial AIR 20 installation from a SideCar, launching the .air package results in Mac OS X “blessing” the Adobe AIR Installer that sits next to it. Hence forward, Mac OS X remembers this application as the default launcher for an .air package. If you do not delete this directory after installing, then anytime you launch an .air package, this Adobe AIR Installer is launched. Checking that the AIR Runtime is now present, it goes on with the standard AIR App installation that is done by the AIR Runtime.


Now when you uninstall AIR 20, install AIR 19, and then try to launch an .air package, this attempt fails because the Adobe AIR Installer that is a 64-bit binary is unable to load the AIR Runtime that is now a 32-bit binary again. That Adobe AIR Installer (version 20) keeps its precedence over the Adobe AIR Application Installer (version 19) that is present at /Applications/Utilities because the Adobe AIR Application Installer has not been launched yet and is “invisible” to Mac OS X.


The solution to this issue is to simply delete the directory that contains the SideCar .air package and Adobe AIR Installer so that this 64-bit binary longer exists. Thus, it will not be launched by Mac OS X when .air launches. Instead, the 32-bit Adobe AIR Application Installer will be launched.


AIR 64-bit on Mac OSX

By Nidhi Tanwar


With the release of AIR 20, the feature AIR 64-bit implies a major change for the AIR desktop developers. In the previous AIR versions, a 32-bit Runtime Dynamic Library was provided for Mac and Windows. However, with the release of AIR 20, only a 64-bit Runtime Dynamic Library is provided on Mac OS X. This means that all the new applications created by AIR developers will run on the 64-bit Runtime on Mac OS X. All the existing shared applications, captive applications, and native applications will continue to work on the 64-bit Runtime on Mac OS X.

Changes for existing applications

The existing AIR applications require the following changes when using AIR 64-bit.

Shared, Captive, and Native applications

These applications will continue to run on AIR 64-bit.

Native extension

All the native applications that use a 32-bit ANE need to add a 64-bit ANE to continue working with AIR 20 and beyond on Mac OS X. To create a 64-bit ANE, you have to provide the platform value as MacOS-x86-64 in the extension descriptor file and in the command used to create the ANE.

So, a native extension descriptor file for Mac OSX will have the following structure:

  <platform name="MacOS-x86-64">

And the command for creating the ANE will be:

adt -package  -target ane  path/where/you/want/YourANE.ane YourExtensionDescriptor.xml  -swc YourAIRLibrary.swc  -platform MacOS-x86-64  library.swf YourMacOSNativeLibrary.framework

Libraries and frameworks for Xcode

When you are creating the native code extension for 64-bit architecture using Xcode, the following libraries and frameworks have to be included in Xcode (see figure below):

  • Adobe AIR.framework
  • Adobe AIR_64














Note: If you do not add Adobe AIR_64, which is a 64-bit dylib inside the Adobe AIR framework, you may get link errors such as “ld: symbol(s) not found for architecture x86_64 error.”

Linking ANE using Flash Builder 4.7

If you are linking your AIR application with 64-bit ANE using Flash builder 4.7 by adding the ANE in ActionScript Build Path for the AIR project, you will notice that there is a red ‘X’ next to the ANE file entry in the Build Paths dialog box (see figure below). If you click the triangle, you will see the error “This ANE does not support air-native-macosx platform”. This is a quirk in Flash Builder 4.7; if you click the triangle next to Targets, you will see that MacOS-x86-64 is supported by the ANE.

Linking ANE using Flash Builder 4.7


The red ‘X’ issue is observed again when you are packaging the ANE by including the ANE in ActionScript Build Packaging.

Ignore the error and click OK.



When you are creating your native application from the Project >Export Release Build, Flash Builder displays a packaging error. To continue with app creation, check select Ignore Errors in Native Extensions tab and click Finish. Your application will be created successfully.



Related Documents

Feathers updates to 2.2.0

Congratulations to Josh Tynjala and the Feathers open source project for the release of Feathers 2.2.0 this week. Feathers offers a large collection of ActionScript UI components and layouts for mobile and desktop. It is powered by Starling framework and  Adobe AIR.


What’s new in this release?

In version 2.2.0, Feathers UI includes a new media player framework, new layouts, and new animated transitions to visually enhance your games and apps.

Media player framework

VideoPlayer component uses Texture.fromNetStream() to display video textures, which was added in Starling 1.7.

SoundPlayer is another component in the media player framework intended for playing audio files.


FlowLayout and WaterfallLayout add new layout options to Feathers containers.

Animated transitions

Two new animated transitions have been introduced to enhance screen navigators: Wipe and Iris.

Example: Here is a quick example of VideoPlayer component:

var player:VideoPlayer = new VideoPlayer();
player.layout = new VerticalLayout();
player.setSize( stage.stageWidth, stage.stageHeight );
this.addChild( player );

To play a video file, pass the URL to the videoSource property:

player.videoSource = "";

We need to add an ImageLoader component as a child of the VideoPlayer to display the video texture:

var loader:ImageLoader = new ImageLoader();
var loaderLayoutData:VerticalLayoutData = new VerticalLayoutData();
loaderLayoutData.percentWidth = 100;
loaderLayoutData.percentHeight = 100;
loader.layoutData = loaderLayoutData;
player.addChild( loader );

When VideoPlayer dispatches Event.READY, we can pass the video texture to the ImageLoader:

function readyListener( event:Event ):void
    loader.source = player.texture;
player.addEventListener( Event.READY, readyListener );

A number of media player controls such as PlayPauseToggleButton and SeekSlider may be added as children too.

See How to use the Feathers VideoPlayer component for complete details.

Get started with Feathers UI 2.2.0

You can find the Feathers UI 2.2.0 release notes on the project’s Github page.

Developers are encouraged to download the latest stable version from the Feathers website.

Troubleshooting common Adobe AIR installation errors with iOS applications


By Piyush Bagri

In this post, we will explain the possible causes and solutions for some general errors that may occur when installing an AIR application on iOS devices using Flash Builder, Flash Professional, or command-line. This will help you to narrow down the installation error to a specific cause so that it can be resolved easily.

Installation error: “Application verification failed.”

The possible causes for this installation error along with the solutions to rectify it in each case are specified here.

Wildcard characters used in application id

If you are using any wildcard characters in the application id in your project, for example ‘calculator.debug.*‘, you will get ‘application verification failed‘ error.

Solution: The error will be resolved as soon as you remove the wildcard characters from the application id.

Feature listed in application.xml file is not added in the provisioning profile

If you are trying to compile your IPA with aps-environment key in entitlement.plist tags in application.xml file as shown in the example below and push notification service is not enabled in provisioning profile, then also you will get ‘application verification failed‘ error.

Example: Entitlements tag has been added in application.xml file but the push notification service is not enabled in provisioning profile.


Solution: Simply comment the above section of the code in application.xml or else add the feature in the provisioning profile. You will be able to rectify this error and compile your project. For more details, see Using push notifications in AIR iOS apps.

Wrong certificate used for packaging

You can also get ‘application verification failed‘ error if there is something wrong with the developer certificate that you are packaging your AIR application with. Another reason for the error could be that your device UUID is not listed in the provisioning profile.

Solution: You will be able to install your app on the device when you connect the right certificate with your provisioning profile. To know more about applying for an iPhone developer certificate and creating a provisioning profile, see Obtaining and working with iPhone developer files.

Installation error: “iTunes mobile device library not found. Please check your iTunes installation.”

This installation error is mainly related to the version of Adobe Flash Professional CC and/or AIR SDK that you are using to connect with Apple iTunes while installing the AIR application on your device. You may get this error in the following cases:

Using Flash Professional CC 2014 with iTunes 12.1.2

If you are using Adobe Flash CC 2014 and AIR SDK (any version) with iTunes 12.1.2, you may get this installation error when in your Flash Professional CC project you select:

File > Publish >Install application on the connected iOS device

Solution: This issue has been fixed in the latest Adobe Flash Professional CC 2015 version. With this fix, it can now be used with Adobe AIR SDK (any version) and Apple iTunes version 12.1.2 in Windows environment.

Using ADT version 16 or older with iTunes 12.1.2

If you are trying to install your application on the iOS device by command-line using ADT version (same as AIR SDK version) 16 or older, you can encounter this error. ADT is not able to detect iTunes 12.1.2 library in this case.

<AIRSDK Location>/bin/adt –installApp –platform ios –package <package name>

Solution: It is recommended to use Adobe AIR SDK version 16 or newer to resolve this error. iTunes 12.1.2 library is detected by Adobe AIR SDK 16 or newer versions.

Using ADT version or older with iTunes 12.3

If you are trying to install your application on the iOS device by command-line using ADT version (same as AIR SDK version) or older, you can encounter this error. ADT is not able to detect iTunes 12.3 library in this case.

Solution: With AIR SDK build this issue has been resolved.

Installation error: “PackageInspectionFailed”

This installation error is mainly related to the version of Adobe Flash Professional CC and/or AIR SDK that you are using to connect with Apple iTunes while installing the AIR application on your device.

Solution: With Flash Builder 4.7, cleaning your project solves this error.

To clean you project, choose Project> Clean > Clean All Projects. See Build projects in Adobe Flash Builder 4.7 documentation for more details.


Typically, you want to have the latest version of Adobe AIR. To get it, follow the instructions at Download and install Adobe AIR. However, you can get an older version of Adobe AIR here.

Do you still have problem with the installation of Adobe AIR application? Post your question in the Adobe AIR Installation Issues forum.