While working with amxmlc and adt command line from Flex and AIR SDK, I always have to seek this version number to get the correct pair of Flash Player version and AIR version.
Tired of looking for this list on google. I'll keep the table of swf compiler option, Flash Player, and AIR version at here.
Compiler Option
|
Flash Player Version
|
AIR version
|
-swf-version=9
|
9.0
|
N/A
|
-swf-version=10
|
10.0, 10.1
|
1.5, 2.0
|
-swf-version=11
|
10.2
|
2.6
|
-swf-version=12
|
10.3
|
2.7
|
-swf-version=13
|
11.0
|
3
|
-swf-version=14
|
11.1
|
3.1
|
-swf-version=15
|
11.2
|
3.2
|
-swf-version=16
|
11.3
|
3.3
|
-swf-version=17
|
11.4
|
3.4
|
-swf-version=18
|
11.5
|
3.5
|
-swf-version=19
|
11.6
|
3.6
|
-swf-version=20
|
11.7
|
3.7
|
-swf-version=21
|
11.8
|
3.8
|
-swf-version=22
|
11.9
|
3.9
|
-swf-version=23
|
12
|
4
|
-swf-version=24
|
13
|
13
|
-swf-version=25
|
14
|
14
|
-swf-version=26
|
15
|
15
|
source taken from here
Additionally the command to build an swf is as below
-sp ./src ./libsrc \
-el /AIRSDK/frameworks/libs/air/airglobal.swc \
-l ./lib/ ./libext \
-show-actionscript-warnings=false \
-swf-version=23 \
-compress=true \
-frame=MovieClip,GameManager \
-debug=true \
-use-network=true \
-o game-android.swf ./src/Preloader.as
And the command to build apk from that swf is as below
/AIRSDK/bin/adt \
-package \
-target apk-captive-runtime \
-storetype pkcs12 \
-keystore certificate_here.pfx \
-storepass certificate_pass_here \
target_name.apk target_name-app.xml \
-platformsdk /AndroidSDK/android-sdk-macosx \
-extdir ./ane \
-C ./ \
game-android.swf \
Default.png \
Default@2x.png \
Default-568h@2x.png \
Default-Landscape@2x~ipad.png \
Default-Landscape~ipad.png \
Default-Portrait@2x~ipad.png \
Default-Portrait~ipad.png \
./img/cc_29.png \
./img/cc_57.png \
./img/cc_72.png \
./img/cc_114.png \
./img/cc_144.png \
./img/cc_512.png \
./img/cc_1024.png
And to check if device ready before install apk to device
/AndroidSDK/android-sdk-macosx/platform-tools/adb \
devices
And to install apk file to device
/AndroidSDK/android-sdk-macosx/platform-tools/adb \
install \
-r ~/Work/puzzle/target_name.apk
And last but not least is run that installed apk
/AndroidSDK/android-sdk-macosx/platform-tools/adb shell 'am start -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -n air.put.app.id/.AppEntry'
Put everything in one shell-command-file.sh and you are ready to roll.
