Vote for AS3 AIR Projects in Flex Builder

Currently, there is no way to create an ActionScript-based AIR project. There is a workaround where  you create a Flex-based AIR project and remove the XML file and add a main class file instead and set that as your main application, or change the name of the file from .mxml to .as and make it a class. But to someone who doesn’t know this, it would appear that AIR == Flex only.

If you think it’s important to have this option, vote:

https://bugs.adobe.com/jira/browse/FB-9303

This entry was posted in Apollo, Flash. Bookmark the permalink.

13 Responses to Vote for AS3 AIR Projects in Flex Builder

  1. Eric Smith says:

    Thanks for posting that link. Pure Actionscript for the win.

  2. Hey man,

    I would love to be able to create it directly, but for now, I just use ActionScript Project i Flex Builder 3, and add the airglobal swc to my source path. Then I use Flash as my Air Editor. Think that works pretty good 🙂

    /JBOY

  3. sascha/hdrs says:

    You could use an Ant build file to completely build/package an AIR application. In fact I’m doing so while working with FDT. I prefer Ant builds anyway because you have more flexibility like auto-increasing the build nr. and such things. Downside is that it seemingly takes longer to build. I’m working on a Flex/AIR project and ech build takes 6-10 seconds (boy I wish myself back to MTASC-compile speeds)!

  4. kp says:

    Yes, there are other workarounds. The point is that I think this is, or could be, a common workflow, and should be supported as such, without requiring workarounds.

    Also, as I said, if a beginner comes to Flex Builder with the idea of making an AS3-based AIR application, they aren’t going to know about workarounds. They’re going to see no option for this, only an option for Flex-based AIR apps. The obvious conclusion is that AIR requires Flex, which is completely false.

  5. George says:

    Can someone provide an expanded version of the workaround? I’m trying to get it running but I’m having issues. I tried to create a new Flex AIR project and I switched the main application file from test.mxml to test.as, but it doesn’t compile anything. Is there some obvious extra step I’m missing? Is there something that needs to be in my .as file?

  6. kp says:

    what is in test.as? if it’s still an mxml document, it won’t work. you need to create an actual class that extends Sprite or MovieClip.

  7. George says:

    No, it’s a proper actionscript project (it’s a simple hello world). Just to make sure I copy and pasted the actionscript directly into another project which was exported as a plain SWF and it worked fine.

    If there isn’t anything I need to do beyond simply creating a proper .as file then I’ll chalk it up to a flex builder linux specific issue.

    Basically, the as is being exported as a working swf to the default bin-debug folder (I can run the swf and it works fine) but it seems as if the next step (turning the swf into an AIR app) isn’t taking place.

  8. SK says:

    George, I am having the same issue.

    Tried changing the main file to .as, tried deleting the MXML file and creating a new Sprite subclass set as default application and when run / debug get nothing.

    I sometimes get the error:

    Process terminated without establishing connection to debugger.
    invocation forwarded to primary instance

    (When debugging)

    I have noticed that the Library Path does not include the playerglobal SWC library, and have tried adding that, also with no success. Please someone who has got this working explain exactly how you did it as I need to see how effective this Flex AS3 AIR workaround is for an urgent project.

  9. jonathan says:

    JBOY,

    would you be able to elaborate a little more? I have added the airglobal.swc to source path, but it still appears to be just exported a SWF. How do you then create an AIR app? Are you just opening up a FLA and using the AS from your FB3 project and exporting as AIR?

    thanks!

  10. A bit late but I did the following:

    – Created Flex/AIR Project putting you src wherever your main class for the AIR APP
    – Change main .mxml to .as (Main.as for example)
    – wrote in Main.as:

    package {
    import flash.display.Sprite;

    public class Main extends Sprite
    {

    public function ToolBox()
    {
    trace(“Hello AIR”);
    }
    }
    }

    – Create Flash Air File
    – Set Doc Class to mains.as

    Now use Flex Builder to write some AS3 with Air Support and use Flash tu publish your appication at the end

    LEt me know if you already got a better way.

    Cheers

  11. Adrian Parr says:

    Are you now allowed to create an AS3 only AIR project in Flash Builder? I’ve had a quick look and it doesn’t appear you can easily.

  12. kurt says:

    hey, i want to vote that we should have an option for creating air projects in as3 as part of the workflow… super lame that you can’t… no idea what they were thinking at adobe, excluding as3 from default projects. i would vote but not into signing up just to vote for a feature.

  13. nlmoreaux says:

    it’s simple, just remember this.stage.nativeWindow.activate(); 😉

Leave a Reply