Skip navigation
Currently Being Moderated

Using Air 2.6 with Flash CS5

Mar 23, 2011 4:00 PM

hey there all,

here is what i am doing so far to use Air 2.6 with Flash CS5. i counts seem to find any help online with this, hope this helps someone...

 

 

Setting Up Flash CS5

 

1. replace Program FIles\Adobe\Adobe Flash CS5\Common\Configuration\ActionScript 3.0\AIR2.0\airglobal.swc with the airglobal.swc in the AdobeAIRSDK\frameworks\libs\air folder of the AIR 2.6 SDK zip file (AdobeAIRSDK.zip)

 

This lets you compile with the new SDK and use all the new API for camera roll, microphone, etc.

 

 

2. replace Program Files\Adobe\Adobe Flash CS5\AIK2.0 with the AdobeAIRSDK folder in the zip file (AdobeAIRSDK.zip) you downloaded from Adobe.

 

now you can do a test movie in Flash CS5 and it will use the new ADL for testing in Flash (finally works with landscape!).

 

 

Publishing

 

for publishing, unfortunately you cant use the built-in publish for iOS. i wrote this batch file and use it (also you can write an ant task if you use FDT/Flash Builder). This is for windows 64bit...

 

"C:\Program Files (x86)\Java\jre6\bin\java" -jar C:\AdobeAIRSDK\lib\adt.jar -package -target ipa-ad-hoc -storetype pkcs12 -keystore [KEYFILE].p12 -storepass [KEY PASSWORD] -provisioning-profile [MOBILE PROVISION FILE].mobileprovision [IPA NAME].ipa [XML FILE NAME].xml [SWF FILE NAME].swf Icon_29.png Icon_48.png Icon_57.png Icon_72.png Icon_512.png Default-Landscape.png Default-Portrait.png Default-PortraitUpsideDown.png Default-PortraitLandscapeLeft.png Default-PortraitLandscapeRight.png

 

i have a 64bit system so i had to specify the 32 bit JRE and use the ADT jar for packaging. now i just double-click the batch file and it compiles for iOS.

 

 

 

Adjusting the app.xml File

 

the yourapp-app.xml file needs some tweaks from the CS5 packager to work in 2.6:

 

1. namespace has to change from

<application xmlns="http://ns.adobe.com/air/application/2.0">

to

<application xmlns="http://ns.adobe.com/air/application/2.6">

 

2. the version node needs to be renamed versionNumber

from

<version>.5.572<</version>

to

<versionNumber>0.5.572</versionNumber>

notice you need to include the leading zero if you arent using a whole number version

 

 

 

ok, thats what i have so far, hope this helps...

 
Replies 1 2 3 4 Previous Next
  • Currently Being Moderated
    Mar 23, 2011 11:15 PM   in reply to michelangelo.capraro

    Nice info for the new update AIR 2.6

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 24, 2011 12:02 AM   in reply to michelangelo.capraro

    i dont know why, but this broke my flash it is not launching now! i did a backup of the changed files, and restoring them is not working too!

    Is there a way to fix it whitout re-installing?

    THANKS!

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 24, 2011 12:11 AM   in reply to Luiz-BR

    What u did? which files you modified or removed?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 24, 2011 12:18 AM   in reply to relaxatraja

    Sorry, it was a java erros (when launching flash) i looked into the flash log erro, and reinstalled java and now it is working!

     

    Sorry about the previous message!

    This method is now working! 

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 24, 2011 12:22 AM   in reply to michelangelo.capraro

    Hi michelangelo.capraro,

     

    I would like to know one thing, which you provided ADT command line is working for me but how to do attachments in the command line because I have more folders to attach with the main file. Now its only publishing the index file without any attachments. Any Idea?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 24, 2011 5:14 AM   in reply to michelangelo.capraro

    I'm very disappointed that an update for Flash CS5 was not made available to accommodate these new features.  These hacks will certainly work but should not be tolerated.  A concerted effort should be made to get Flash CS5 up-to-speed.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 24, 2011 7:09 AM   in reply to michelangelo.capraro

    Hy!

    Excelent news!

     

    But I can't run it...


    I follow the steps for installing it but I have some kind of error:

    When I publish, it says:

     

    /Users/jorge/Desktop/test/testAndroid_2/IphoneTest_2-app.xml: error 102: Invalid namespace http://ns.adobe.com/air/application/2.6

     

    Any idea!?

     

    Thanks!

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 24, 2011 8:52 AM   in reply to billo

    Agreed.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 24, 2011 10:39 AM   in reply to michelangelo.capraro

    Hi,

     

    Yes I'm running CS5.

    Would be great if you could put an OSX shell script!

     

    Thanks!

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 25, 2011 12:40 AM   in reply to michelangelo.capraro

    When i was using the old compiler (flash cs5) my app was running in solid 30fps

     

    Now with this Air 2.6 compiler, it is running with  12-15fps!!!

     

    What im doing wrong in my programming? Is there any trick to fix this!

     

    PLEASE HELP! Thanks!

     

    (on ipad test, it is slow) (on ipod2g, it is reaching 30 but drops a lot to 22)

     

    Message was edited by: Luiz-BR

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 25, 2011 2:53 AM   in reply to michelangelo.capraro

    Hi,

     

    the one big advantage with 2.6 publishing is, that the app behaves as it should when it comes to moving objects performance slowdown.
    Before performance would break down in strange ways if I inserted too many moving objects in my sandbox. Now the framerate just goes down when raising  the objects count.


    If you want, check out the video of my proto: http://www.youtube.com/watch?v=uE56XCG06FM

     

     

    I had some bad performance, when i packaged a project that ran fine with the old packager due to a stage scaling issue.

    Performance on the ipad seemed to be really bad when publishing a iPhone project without "stage.scaleMode = StageScaleMode.NO_SCALE"  with 2.6.

     

    I am actually pretty happy with this release (at the moment).

     

    Simon

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 25, 2011 4:18 PM   in reply to michelangelo.capraro

    Hi michelangelo.caprarohttp://forums.adobe.com/people/michelangelo.capraro

     

    I am having hard time to run the compile script. I am getting the following error:

     

    Line: 51

    Char: 7

    Error: The system cannot find the file specified.

    Code: 80070002

    Source: (null)

     

    Please guide me what I am doing wrong. I really appreciate your help. Thanks!

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2011 5:36 AM   in reply to AK_US

    AK US,

     

    Try adding \" (double quotes) around java and adt.jar filepath in compile-ios.wsf. May be the script is returning an invalid filepath.

     

    Here is code:

         var JRE_BIN = "\"c:\\Program Files\\Java\\jre6\\bin\\java\"";

         var ADT_JAR = "\"C:\\Program Files\\Adobe\\Adobe Flash CS5\\AIK2.0\\lib\\adt.jar\"";

     

    It worked for me.

     

    Manjith

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2011 10:25 AM   in reply to Luiz-BR

    Make sure you set the all the appropriate settings in the descriptor file. When I first tested my latest app in 2.6, it was running really slow for 2 reasons:

    1. It was not set to full screen, so when it scaled down it took a processor hit

    2. The renderMode was not set to gpu.

     

    Here's waht my descriptor file looks like:

     

    <?xml version="1.0" encoding="utf-8" ?>
    <application xmlns="http://ns.adobe.com/air/application/2.6" minimumPatchLevel="0">
        <id>com.flashvt.Chainless140</id>
        <name>Chainless140</name>
        <versionNumber>1.0</versionNumber>
        <filename>Chainless140</filename>
        <supportedProfiles>mobileDevice</supportedProfiles>
        <initialWindow>
            <content>AVIDChainlessChallenge.swf</content>
            <title>Chainless140</title>
            <fullScreen>true</fullScreen>
            <renderMode>gpu</renderMode>
        </initialWindow>
        <icon>
            <image29x29>finalIcons/icon_29x29.png</image29x29>
            <image57x57>finalIcons/icon_57x57.png</image57x57>
            <image512x512>finalIcons/icon_512x512.png</image512x512>
        </icon>
    </application>

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 26, 2011 11:47 AM   in reply to manji8

    Hi Manjith

     

    Thank you so much. I will try to add \" and let you know if it's working or not.

     

    I tried the following script to create the IPA file and it worked for me.

    ./adt -package

    -target ipa-test

    -storetype pkcs12 -keystore <your p12 file> -storepass <your pass>

    -provisioning-profile <your mobile provision file>

    YourApp.ipa

    YourApp-app.xml

    YourApp.swf

     

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 28, 2011 5:48 AM   in reply to michelangelo.capraro

    Thanks men!!!

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 28, 2011 6:52 AM   in reply to michelangelo.capraro

    Hey guys,

     

              I really need some help here, I followed the above steps and when I do a test movie inside of flash nothing happens, the player just appears for a sec then disappears.

     

         Thanks in advance...

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 28, 2011 7:16 PM   in reply to michelangelo.capraro

    @michelangelo.capraro

    Thank you so much. Your original post saved me. I will name all of my children after you.

     

    @epicfall

    I had the same problem initially. Then I went Control > Test Movie > In AIR Debug Launcher (Mobile). After that I did Control > Delete ASO Files and Test Movie then it worked.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 28, 2011 8:28 PM   in reply to michelangelo.capraro

    yes, AIR debug launcher is selected, still nothing happens...

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 28, 2011 11:44 PM   in reply to michelangelo.capraro

    hi guys,

     

    I have all the correct certifs in place and the correct swf and xml etc and its starts to compile but then asks me for the password which I add

    then it spits out:-

     

    The key could not be obtained. You may need to use the -keystore argument with the specified keystore type.

     

    any ideas?

     

     

    thanx in advance

     

     

     

    KBN

     


     
    |
    Mark as:
  • Currently Being Moderated
    Mar 29, 2011 6:23 AM   in reply to kipper_bottle_num

    @kipper_bot_num

     

    I received the same error once. It happened when I was pointing to the wrong p12 certificate.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 29, 2011 7:46 AM   in reply to michelangelo.capraro

    Hy,

     

    Have you been able to compile in Flash CS5, mac versión, in OSX?

     

     

    Thanks!

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 29, 2011 5:41 PM   in reply to epicfall

    @epicfall

    It turns out that my "solution" was probably unrelated to whatever the problem is. Unfortunately I'm having the same problem as you again: Test Movie doesn't seem to work anymore. It worked once, and then stopped ... forever. We tried deleting ASO files, starting a completely new iOS project and Test Movie-ing that, restarting Flash CS5, and restarting the machine. Can anyone help?

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 29, 2011 9:42 PM   in reply to michelangelo.capraro

    We're running Windows XP SP3. I think I've narrowed it down slightly, in the sense that I can reproduce the problem now.

     

    Reproducible problem:

     

    If I create the new iPhone OS file with the new AIK2.0 folder and airglobal.swc, then "Test Movie" will not work for me. It will show the "Exporting SWF Movie" dialogue, a .swf and -app.xml file will be produced, but the Test Movie window will never appear.

     

    However, if I create the new iPhone OS file with the original AIK2.0 folder and airglobal.swc, "Test Movie" will work (the Capabilities.version will be WIN 10,1,53,32). Then, I close Flash, change to the new AIK2.0 folder and airglobal.swc, reopen Flash, and "Test Movie" again ... Test Movie works. The Capabilities.version is WIN 10,2,153,1. Test Movie will then continue to work for that file no matter how many times it's opened/closed, and despite whatever version of AIK2.0 folder and airglobal.swc.

     

    Strange no? Any ideas how to fix this? @epicfall, I would be interested to see how you go with trying to reproduce this too.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 29, 2011 10:29 PM   in reply to michelangelo.capraro

    @michelangelo.capraro

    You're a genius! I'm running out of children to name after you!

     

    In summary: If you find that "Test Movie" doesn't work for you, check that your -app.xml file has been adjusted as in the original post. ie,

    1. namespace must be <application xmlns="http://ns.adobe.com/air/application/2.6">

    2. <versionNumber> instead of <version>

     

    Thanks again!

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 30, 2011 10:56 AM   in reply to michelangelo.capraro

    SO...has anyone got ideas on how to include an 'assets' folder with this compile?

     

    I can use the batch fine but it doesn't include the 'assets' folder which we need.

     

    Any ideas?

     

    Thanks so much to the other posters here though...VERY helpful.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 30, 2011 12:22 PM   in reply to michelangelo.capraro

    hey!

     

    thanks for speedy reply!

     

    I've worked it out via the docs ...silly me.

     

    You just add to the end of the adt command the files or folders you require to be included in the build. bingo!

     

    But....keep getting 'entitlements' error when syncing to the iPad.

     

    Provisioning profile and certificate all worked fine before.

     

    How do you compile the swf out of interest? Just via the test movie command in Flash IDE?

     

    Any clues?!

     

    Thanks guys.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 30, 2011 6:35 PM   in reply to michelangelo.capraro

    I am still confused on how to get this to work. I can not publish an ipa. This is making me not want to use flash anymore. It seems like if I have to use terminal adobe isn't doing there job.

     

    Why did they stray from the packager. This is not worth the hassle.

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 31, 2011 9:51 AM   in reply to michelangelo.capraro

    Hey, will this work on desktop apps...I also tried on desktop, but the test movie is still not working..

     
    |
    Mark as:
  • Currently Being Moderated
    Mar 31, 2011 6:13 PM   in reply to epicfall

    I finally got it to work. Here is what i learned.

     

    you need to have all 4 files in the bin folder.

     

    yourapp-app.xml

    yourapp.swf

     

    (these can be named what ever you have them named)

    myCertificates.p12

    myProvision.mobileprovision

     

    then open up terminal.

     

    type in "cd" (then a space) then drag your bin folder into it and hit enter.

     

    this will navigate terminal to your bin folder, so termianl runs the command from the right location.

     

    so then it should look something like this

     

    flashstation04:bin tom$ (which tells you its in your bin file)

     

     

    then run your script. Its important to note there can't be an returns in it. I pasted it in to text edit first and wrote it all out on one line and then pasted it into terminal.

     

    ./adt -package -target ipa-test -storetype pkcs12 -keystore myCertificates.p12 -storepass blablabla -provisioning-profile myProvision.mobileprovision yourapp.ipa yourapp-app.xml yourapp.swf

     

    Then it should work!

     
    |
    Mark as:
1 2 3 4 Previous Next
Actions

More Like This

  • Retrieving data ...

Bookmarked By (0)