How to set up a complete flash/flex/air development environment on Scientific Linux, using FDT, Flex SDK 4.0.0 + Air

  1. Download the Flex SDK and Air SDK:
    mkdir ~/sdks
    cd ~/sdks/
    wget http://fpdownload.adobe.com/pub/flex/sdk/builds/flex4/flex_sdk_4.0.0.14159.zip
    wget http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRSDK.tbz2
    mkdir ~/sdks
    cd ~/sdks/
    wget http://fpdownload.adobe.com/pub/flex/sdk/builds/flex4/flex_sdk_4.0.0.14159.zip
    wget http://airdownload.adobe.com/air/lin/download/2.6/AdobeAIRSDK.tbz2
  2. Extract the Flex SDK then merge the contents of the the Air SDK into the unzipped flex sdk::
    mkdir flex_sdk_4.0.0_plus_air
    unzip flex_sdk_4.0.0.14159.zip -d flex_sdk_4.0.0_plus_air
    tar -jxvf AdobeAIRSDK.tbz2 -C flex_sdk_4.0.0_plus_air/
    mkdir flex_sdk_4.0.0_plus_air
    unzip flex_sdk_4.0.0.14159.zip -d flex_sdk_4.0.0_plus_air
    tar -jxvf AdobeAIRSDK.tbz2 -C flex_sdk_4.0.0_plus_air/

Test your Air SDK

  1. Download FDT from the powerflasher website:
    http://www.fdt.powerflasher.com/developer-tools/fdt/download/
  2. Run FDT, right click on your Flash Explorer>New>New Flash Project
  3. Select Desktop>AS3 AIR
    image1307701257 How to set up a complete flash flex or air development environment on linux
  4. Add some test code to Main.as, eg.:
    package
    {
    import flash.display.Sprite;
       public class Main extends Sprite
       {
          public function Main()
          {
             graphics.beginFill(0x334455);
             graphics.drawCircle(100, 100, 100);
          }
       }
    }
    package
    {
    import flash.display.Sprite;
       public class Main extends Sprite
       {
          public function Main()
          {
             graphics.beginFill(0x334455);
             graphics.drawCircle(100, 100, 100);
          }
       }
    }
  5. Click on the debug icon to compile the air app:
    image1307701674 How to set up a complete flash flex or air development environment on linux
  6. If it’s the first time you are compiling the app, you might need to set up a Run Configuration:
    In the Run Configurations window Double click on FDT SWF Application:
    image1307700872 How to set up a complete flash flex or air development environment on linux
    Your Project, Main Class and Output should be all selected. If not, click on browse and select src/Main.as.
  7. You will probably get an error, complaining about the adl:
    .../flex/bin/adl: cannot execute binary file

    image1307701431 How to set up a complete flash flex or air development environment on linux
    This is because the adl that comes with the default 4.0.0 SDK is built for Mac and not Linux.

  8. To fix it, you’ll need to compile it with the SDK you downloaded earlier.
    Right click on your project, go to Properties>FDT COmpiler>Configure:
    image1307702098 How to set up a complete flash flex or air development environment on linux
  9. Click Add, navigate to the sdks folder (~/Documents/sdks/flex_sdk_4.0.0_plus_air/)
    image1307702145 How to set up a complete flash flex or air development environment on linux
  10. Try compiling the app again.
    You should see the compiled air app:
    Screen shot 2011 06 10 at 12.00.14 How to set up a complete flash flex or air development environment on linux
Tagged with:
 

One Response to How to set up a complete flash flex or air development environment on linux

  1. Bohdan Makohin says:

    Thanks, good guide for Flash/AIR newcomers…

Leave a Reply

Your email address will not be published. Required fields are marked *

*


five − 4 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code lang=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" extra="">