Versioning in Flash Runtime (-swf-version)

AIR 3 Beta got released on Adobe Labs last week, providing a great opportunity to try out some of the exciting new enhancements that have been made by the team. Christian’s post provides the quick steps to get started with the AIR 3 Beta SDK.

In the “Additional compiler arguments” box, you need to add “-swf-version=13″ to make use of the new APIs introduced in AIR 3. So one question you might have is that if you are already specifying the namespace in your AIR application descriptor as 3.0, then what is the need of specifying more versioning information? Let me share with you some background about versioning in Flash Runtime.

SWF Versioning

Starting with AIR 2.6 release (and Flash Player 10.2), we changed our SWF versioning approach. Earlier we used to increase the SWF version only with major release of Flash Player. For eg.

Flash Player Version
Adobe AIR Version
SWF Version
9.0.15.0 - 9
9.0.115.0 - 9
10.0 1.5 10
10.1 2.0 10
10.2 2.6 11
10.3 2.7 12
- 3.0 (Beta) 13

Post AIR 2.5 (Flash Player 10.1) however, we started increasing the SWF version with every release, both minor and major. So we docoupled the SWF version with versioning Flash Player or Adobe AIR.

API Availability

A new version of Flash Player and AIR might introduce certain new APIs that were not available in the previous versions. If an application makes use of those new APIs, then the currently installed Flash Runtime (on the end user’s desktop/mobile platform) would check if it is capable enough to execute those new APIs. So let’s see how exactly that happens in the Runtime.

Flash Player – When Flash Player identifies content that is newer than itself (defined by the SWF version) it attempts to run the content as best it can, but eventually fails if the content tries to use features that don’t exist in that version of the player.

Adobe AIR – Unlike Flash Player, AIR does not attempt to run content that was built for newer versions of AIR. The correct API set to be exposed to the application depends on the lower of the following two:

1. SWF version corresponding to the namespace in the application descriptor
2. SWF version of the root SWF in the application

Coming back from where we started – To ensure that newly introduced APIs are available to you while using AIR 3 Beta SDK, remember to add “-swf-version=13″ to the compiler arguments.

2 Responses to Versioning in Flash Runtime (-swf-version)

  1. Rich Morey says:

    I wish there was a way to create an application version number for a RIA created in Flex or Flash.

  2. Kaushal Jha says:

    Hi Romil,
    could you or someone please help update the mapping list above? I ask because the current (Feb 2013) versions of the flash player and swf files are missing.