Error #1009 in as3 code to install an Air application from an embedded swf.

Hi, I am getting error #1009 in my code when i try to install the application. I am new to action script and below is the code for my installer.
var airSWF:Object; // This is the reference to the main class of air.swf
var airSWFLoader:Loader = new Loader(); // Used to load the SWF
var loaderContext:LoaderContext = new LoaderContext(); 
                                // Used to set the application domain 
var paramObjAppid:Object = LoaderInfo(this.root.loaderInfo).parameters.appid;
//var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;
loaderContext.applicationDomain = ApplicationDomain.currentDomain;
airSWFLoader.contentLoaderInfo.addEventListener(Event.INIT, onInit);
airSWFLoader.load(new URLRequest("http://airdownload.adobe.com/air/browserapi/air.swf"), 
                    loaderContext);
function onInit(e:Event):void 
    airSWF = e.target.content;
var url = '';
var qty = '';
var appID = '';
var pubID = "";
var runtimeVersion = "3";
var tf:TextField = new TextField();       // create a TextField names tf for debugging
tf.autoSize = TextFieldAutoSize.LEFT;
//tf.size = 4;
tf.wordWrap = true;
tf.border = true;
addChild(tf);        
try
    var keyStr:String;
    var valueStr:String;
    var paramObj:Object = LoaderInfo(this.root.loaderInfo).parameters;   //set the paramObj variable to the parameters property of the LoaderInfo object
    for (keyStr in paramObj)
        valueStr = String(paramObj[keyStr]);
        if ( keyStr == 'qty' ) {
            qty = Number(valueStr);
        if ( keyStr == 'url' ) {
            url = escape(valueStr);
        if ( keyStr == 'appid') {
            appID = valueStr;
catch (error:Error)
var arguments:Array = [qty];
launchBtn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_2);
function fl_MouseClickHandler_2(event:MouseEvent):void
    airSWF.getApplicationVersion(appID, pubID, versionDetectCallback);    
function versionDetectCallback(version:String):void
    if (version == null)
        trace("Not installed.");
        tf.appendText('Not Installed');
        try {
               airSWF.installApplication(url, runtimeVersion, arguments);
            catch (error:Error){
                tf.appendText(error.toString());
    else
        trace("Version", version, "installed.");
        tf.appendText("appID="+appID);
        try {
            airSWF.launchApplication(appID, pubID );
        catch(error:Error) {
            tf.appendText(error.toString());

I managed to figure out what was causing the issue, I had a particular png image in my projects assets folder that seemed to be the culprit. Once I removed it the app installs just fine? Really weird?
Adam

Similar Messages

  • Is it possible to install multiple AIR applications from single install?

    I've been asked to find a way to install multiple air applications in one install. Is this possible, or am I going to have to use a 3rd party tool like InstallShield?

    I guess it's possible to create a meta-installer, which fires up the individual installers using the command line. It's not the ideal way to do this, but it might work.
    Sample code to use the command line from within Flex:
    <fx:Script>
    if(NativeProcess.isSupported)
        var file:File = File.desktopDirectory;
        file = file.resolvePath("secondAirProgram.air");
        var nativeProcessStartupInfo:NativeProcessStartupInfo = new NativeProcessStartupInfo();
        nativeProcessStartupInfo.executable = file;
        var process:NativeProcess = new NativeProcess();
        process.start(nativeProcessStartupInfo);
    </fx:Script>

  • Error when trying to install any air application from my flex builder project

    I have a serious problem, I am unable to install any exported air file created in my AppTest project. I just keep getting an error saying: "Sorry, an error has occurred. The application could not be installed because the AIR file is damaged. Try obtaining a new AIR file from the application author."
    I am using FlexBuilder 3 to build and export my app release build. If anyone can help me I would greatly appreciate it.
    Adam

    I'd try un-then-reinstalling and making sure any overlay that you're applying (update of SDKs, etc.) are done correctly.

  • Installing an AIR application from the browser

    I am installing an application using a custom badge.
    Is there any documentation on air.swf?
    After air.installApplication() is called is there anyway to know what happens, i.e. some event to listen to.
    How can I know when installation is complete or if it fails due to an error.
    Currently the web page stops at starting to install and I would like it to be a bit more professional so it can either reflect any error or show the installation is complete.

    quote:
    Originally posted by:
    cjm771
    can't manage to figure out how the air.swf api works
    The main thing you must understand about air.swf
    is that its most important functionality can only be called from
    within a UI event handler, such as for a button click. It's very
    picky about this. You can't, for example, use the button click
    event handler to begin the loading of air.swf, then in the "loaded"
    callback do the air.swf API call. air.swf has to be loaded and
    ready at the time the event handler is called. So, load it on app
    startup. I even go to the extent of disabling the buttons that call
    into air.swf until it's loaded.
    quote:
    im a bit unclear on where i get appid or developer id
    The appid is your application's unique ID, which
    you gave in setting up your project. Adobe recommends using
    something based on your web site's domain name, in reverse order as
    is done in Java and Objective C. If you're at foo.com, and call
    your program Qux, then com.foo.qux is a good appid. The use of
    domain-like names helps ensure that programs from different
    companies don't collide with each others' namespaces.
    By default, the pubid is a random number assigned by the IDE.
    I forgot how you find out what number it used, just that there's a
    way. Or, you can assign it yourself, in the project settings for
    the AIR app. Right-click the project, go to the Run/Debug Settings
    section, edit the launch configuration for your AIR app. You'll
    find a Publisher ID field there. The documentation for ADL may be
    helpful for picking your own pubid.
    quote:
    if someone has an example app or more in-depth explantion of
    incorporating the given code , i would much appreciate it.
    See my code in this thread:
    http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?forumid=75&catid=697&threadid =1352505&highlight_key=y&keyword1=air%2Eswf

  • Can't install air application from website

    I am trying to install an Adobe Air application from a local
    web page using badge but get the "Something went wrong trying to
    install this application"
    When I click on the .air file directly all works ok
    One thing I've noticed is that if I try to launch the .air
    file from the browser, it doesn't to know what program to use to
    open the file as buttons on the (Do you want to save this file or
    find a program online to open it) dialog are Find, Save and Cancel
    (Not Open).
    I've checked the file extensions in Internet Tools and the
    program for .air is Adobe Air Application Installer which I assume
    is correct.
    I've also checked that the MIME entry is correct on IIS
    I'm running on a 32bit machine with Vista Business and using
    IE7
    Can anyone help me please, I've been stuck on this for
    ages

    Howdy Niel
    Looks like Apple has opened it's kimono a bit...
    Statement from Apple to CNBC ± 10:00 PDT-US
    from http://www.cnbc.com/id/102495735
    "We apologize to our customers experiencing problems with iTunes and other services this morning. The cause was an internal DNS error at Apple. We're working to make all of the services available to customers as soon as possible, and we thank everyone for their patience," Apple said in a statement to CNBC.
    ÇÇÇ

  • Installing and Running Air application from webpage

    Hello ,
    I am trying to run the air application from web page and its working fine in my system. (http://localhost:8080/examples/test1.html)
    if i try to run the same air application from another system's webpage by pointing the url to my system's IP Address,(http://lpAdres of my system:8080/examples/test1.html) its showing error "The application could not be installed because the installer file is damaged. Try obtaining a new installer file from the application author"
    Air Application version are . Flex3.6 sdk and Air2.7 sdk & runtime
    Any of you know what could be the problem.
    please help em to resolve this issue asap.
    its very urgent requirement

    Hi, Jeff;
    Make sure you have compiled your application as 32 bit, and not "any cpu".
    See this document for some more info: [64|http://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/10d5fa88-2013-2c10-c9a5-f11963607d4e&overridelayout=true]
    Regards,
    Jonathan
    Follow us on Twitter u2013 http://twitter.com/SAPCRNetSup

  • How to provide terms & conditions option while installing an AIR application

    Hi
    I have an AIR application which is developed using flex SDK. I have got an requirement that when the user tries to install the AIR application, I need to display the terms & conditions details. If the user accepts the terms & conditions, it need to be install the application. Is it possible to do?
    And also i need to set the expiration date (i.e. trial period) so the application gets expired on the specified date in the user's machine. I am not sure whether these two things are possible? Please advice.
    Thanks

    Hi Douglas,
    Thanks very much (and to Chris) for getting back to me.
    I attached a zip file that is a small 'hello world' AIR application that I
    compiled using FlashBuilder 4, configured to use the 4.1 sdk. I also
    attached the self-signed certificate I used when exporting the release
    build. The password for this is dogdish. This application gives the error
    messages I indicated in my post when attempting to install on the Mac where
    the AIR runtime is not yet installed.
    We recently upgraded from FlexBuilder 3 to FlashBuilder 4, which I believe
    is when this issue started. I followed the instructions for doing a side-car
    installation and had no problems with either Mac or Windows when using
    FlexBuilder 3.
    Thanks for any help you can provide!

  • Using NSIS to install an AIR application

    Can I use NSIS to create an installer for an AIR application? I won't be distributing the application.air file, instead I will be distributing the unpacked/installed application files that are generated by the application.air file. I believe Adobe has no legal right to the unpacked/installed application files therefor Adobe can't dictate how those files are distributed, but I need that confirmed if possible.
    The default AIR installer looks very intimidating to end-users due to the design and the "this app will kill your computer and then kill you" messages, and I really don't want end-users to be put off by it, nor am I going to pay for a code-signing certificate when the application itself is free of charge. Adobe really need to take another look at the way AIR applications are installed, the current process/design is a joke.

    I would be very interested to know if you had any luck using NSIS to install your AIR application. I have hit a roadblock using Adobe's sidecar installer because my AIR file is too big. I'm looking at having to split out the content so that my AIR file is small, and then install the content separately. However, I need to install the content to app://, not app-storage:// so that all users can use the application. I'm finding this difficult with Installshield Express, so I'm now attempting to do it with NSIS.
    Kevin

  • I tried to install a free application from the apple store, I was asked to enter the billing information, gave all the details even if free, chose visa as method of payment but I had a note saying that my method of payment is invalid. Why?

    I tried to install a free application from the apple store, I was asked to enter the billing information even if free, gave all the details, chose visa as method of payment but I had a note saying that my method of payment is invalid. Why?

    Hi ...
    Try here >  iTunes Store: My credit card's security code or zip code does not match my bank's records

  • Installing Creative Cloud applications from shared windows folder.

    Hello.
    I got new laptop for work use and I am installing creative cloud on it. However laptop ain't that fast and I am wondering that would it be possible to install creative cloud applications from shared windows folder, since I have downloaded and installed all creative cloud applications on my desktop machine already and laptop is intented for working while not at home.rpr
    This would increase installing speed since all those needed files would be available from Local Area Network, which is faster and my broadband and it also would allow hard drive to focus on installing files instead of current simulataneous reading and writing to same hard drive.

    Hello.
    I got new laptop for work use and I am installing creative cloud on it. However laptop ain't that fast and I am wondering that would it be possible to install creative cloud applications from shared windows folder, since I have downloaded and installed all creative cloud applications on my desktop machine already and laptop is intented for working while not at home.rpr
    This would increase installing speed since all those needed files would be available from Local Area Network, which is faster and my broadband and it also would allow hard drive to focus on installing files instead of current simulataneous reading and writing to same hard drive.

  • Install Adobe Air application (.air file) from command line in Mac OS X

    Hello everybody
    I would like to install an air application on many systems (Mac OS X) using remote install. Is there a way to achieve this?
    Is there a pure command line utility to install Adobe AIR applications (.air files) in Mac OS X?
    Thanks. Masteradi

    Thanks for your reply. I already knew that command but it's good to see it again.
    In the meantime I have found a tool called ARH (AIR Redistribution Helper) which can be used to install an air application, uninstall an air application, etc.
    Now I would like to create a .pkg file (for Mac OS X) that will use ARH together with my .air file and that will install or update (uninstall/install) the application. But I guess this is no more an issue for Adobe AIR. I have to learn the tools specific for Mac (Iceberg, Xcode).
    Best regards
    Masteradi

  • HT201359 HOW TO INSTALL A FREE APPLICATION FROM APP STORE

    HOW TO INSTALL A FREE APPLICATION FROM APP STORE??

    Sync it as you would anything else.  Are you having a problem?
    Please turn off your caps lock.  All caps indicates shouting and is difficult to read.

  • "Se ha producido algún error al intentar instalar esta aplicación" error when trying to install a .air application

    Hello,
    I'm having an issue when trying to install Warcraft Logs application:
    Warcraft Logs - Combat Analysis for Warcraft
    https://www.warcraftlogs.com/client/warcraftlogs.air
    I successfully install Adobe AIR, version 17.0.0.144 (and I'm using Windows 7 64 bits), without any problem (well, that's what I suppose), this is the Install.log from the Adobe AIR:
    [2015-04-19:19:27:30] Runtime Installer begin with version 17.0.0.144 on Windows 7 x86
    [2015-04-19:19:27:30] Commandline is:
    [2015-04-19:19:27:30] No installed runtime detected
    [2015-04-19:19:27:32] Relaunching with elevation
    [2015-04-19:19:27:32] Launching subprocess with commandline c:\users\alberto\appdata\local\temp\air276b.tmp\adobe air installer.exe -ei
    [2015-04-19:19:27:32] Runtime Installer begin with version 17.0.0.144 on Windows 7 x86
    [2015-04-19:19:27:32] Commandline is: -stdio \\.\pipe\AIR_5800_0 -ei
    [2015-04-19:19:27:32] No installed runtime detected
    [2015-04-19:19:27:32] Starting silent runtime install. Installing runtime version 17.0.0.144
    [2015-04-19:19:27:32] Installing msi at c:\users\alberto\appdata\local\temp\air276b.tmp\setup.msi with guid {34927EBC-98D4-4D53-98BE-510DF5999F50}
    [2015-04-19:19:27:33] Runtime Installer end with exit code 0
    [2015-04-19:19:27:34] Elevated install completed
    [2015-04-19:19:27:35] Launching subprocess with commandline c:\Program Files (x86)\Common Files\Adobe AIR\Versions\1.0\Resources\Adobe AIR Updater -installupdatecheck
    [2015-04-19:19:27:35] Runtime Installer end with exit code 0
    [2015-04-19:19:27:35] Runtime Installer begin with version 17.0.0.144 on Windows 7 x86
    [2015-04-19:19:27:35] Commandline is: -installupdatecheck
    [2015-04-19:19:27:35] Installed runtime (17.0.0.144) located at c:\Program Files (x86)\Common Files\Adobe AIR
    [2015-04-19:19:27:35] Performing pingback request
    [2015-04-19:19:27:36] Pingback request completed with HTTP status 200
    [2015-04-19:19:27:36] Starting runtime background update check
    [2015-04-19:19:27:36] Begin Background update download from http://airdownload.adobe.com/air/3/background/windows/x86/patch/17.0.0.144/update
    [2015-04-19:19:27:36] Unpackaging http://airdownload.adobe.com/air/3/background/windows/x86/patch/17.0.0.144/update to C:\Users\Alberto\AppData\Roaming\Adobe\AIR\Updater\Background
    [2015-04-19:19:27:36] Runtime update not available
    [2015-04-19:19:27:36] Unpackaging cancelled
    [2015-04-19:19:27:36] Runtime Installer end with exit code 0
    Afterwards, I try to install the warcraftlogs.air application, and when I execute the program I get the following error:
    Se ha producido algún error al intentar instalar esta aplicación. Instale la versión más reciente de Adobe AIR desde http://www.adobe.com/go/getair_es y vuelva a intentarlo.
    Translated it should be something like this (this is not the official English message):
    Some error has occurred while trying to install this application. Install the latest Adobe AIR version from http://www.adobe.com/go/getair_es and try again.
    I've tried to search anything related, because I can't find that exact error message in any Adobe troubleshooting page, but everything I can find is a really old version issue, or something I've tried without success (trying to install everything running as administrator, also via cmd.exe ran as administrator, installing an older version, uninstalling and installing 100 times Adobe AIR, etc.).
    I've also searched (but not asked) in Warcraft Logs forums for any solution, but I couldn't find anything related either.
    Any help would be appreciated.
    Thank you in advance and best regards! ^^

    Inesipinesii please remove your current installation of the Adobe Download Assistant from your Applications folder.  You will then be able to reinstall the Adobe Download Assistant and begin the download process for Photoshop Elements 11.  You can find more information at http://helpx.adobe.com/creative-suite/kb/troubleshoot-download-assistant.html#main_Known_i ssues.

  • Error occurs when i try to install a built application containing Web services VIs

    Hello,
    at the moment i am trying to create and install a built application containing a Web server and Web services VIs. I did the steps as described here: http://www.ni.com/white-paper/7747/en#toc13
    But when I install my application on the target PC the following error occurs after the installation:
    Error2: Failed to perform action
    "[LV2011RTEDIR]LVWS\NILVWSPostInstallerScript.exe"
    "[ProgramFilesFolder]DeployWebServices\Webservice.lvws"
    What did I do wrong? The project example is attached
    Development system: LV2011 SP1, WIn7
    Target PC: Win7, no LabVIEW, but ALL possible additional installer/run-times installed
    Thanks,
    Elmar
    Certified LabVIEW Developer
    www.merecs.de
    Attachments:
    Deploy Web Services.zip ‏20 KB

    Hi,
    long time ago, but I can remember. You have to copy a folder.
    e.g. I have the file in C:\Program Files (x86)\National Instruments\Shared\LabVIEW Run-Time\2013\LVWS , but there is no LVWS folder in \Shared\LabVIEW Run-Time\2012
    (I have a new computer, and for some reason I'm also missing the file in the LV2012 folder now.)
    Try to copy from another version to 2012 U(or download my fzip). I also don't now, why it is missing. Maybe something during the LV2012 installion was wrong.
    Hope I could help,
    Elmar, CLD
    Certified LabVIEW Developer
    www.merecs.de
    Attachments:
    LVWS.zip ‏688 KB

  • Installing an AIR application with PackageMaker on OS X

    Hello,
    My company has signed the redistribution agreement and I've been working on building an installer using the PackageMaker application built into Mac OS X.
    I'm seeing behavior where the installer fails every other time that it is run. The output from .airappinstall.log is below.
    I've reproduced this behavior from the installer as well as by running the following command line:
    sudo /Applications/Utilities/Adobe\ AIR\ Application\ Installer.app/Contents/MacOS/Adobe\ AIR\ Application\ Installer -silent /MyApp.air
    Has anyone seen this behavior before?
    Starting silent x1 install from file:///tmp/MyApp.air
    UI SWF load is complete
    stateRunningAppInstaller: appinstaller -runtime "/tmp/Adobe AIR Installer Stand Alone.app/Contents/Frameworks" -silent -withRuntime -url file:///MyApp.air
    App installer completed successfully
    begin quitting
    Starting silent x1 install from file:///tmp/MyApp.air
    UI SWF load is complete
    stateRunningAppInstaller: appinstaller -runtime "/tmp/Adobe AIR Installer Stand Alone.app/Contents/Frameworks" -silent -withRuntime -url file:///MyApp.air
    App installer failed; exit code 7
    begin quitting
    Starting silent x1 install from file:///MyApp.air
    UI SWF load is complete
    stateRunningAppInstaller: appinstaller -runtime "/tmp/Adobe AIR Installer Stand Alone.app/Contents/Frameworks" -silent -withRuntime -url file:///MyApp.air
    App installer failed; exit code 7
    begin quitting
    Starting silent x1 install from file:///MyApp.air
    UI SWF load is complete
    stateRunningAppInstaller: appinstaller -runtime "/tmp/Adobe AIR Installer Stand Alone.app/Contents/Frameworks" -silent -withRuntime -url file:///MyApp.air
    App installer completed successfully
    begin quitting
    Starting silent x1 install from file:///MyApp.air
    UI SWF load is complete
    stateRunningAppInstaller: appinstaller -runtime "/tmp/Adobe AIR Installer Stand Alone.app/Contents/Frameworks" -silent -withRuntime -url file:///MyApp.air
    App installer failed; exit code 7
    begin quitting
    Starting silent x1 install from file:///MyAppE.air
    UI SWF load is complete
    stateRunningAppInstaller: appinstaller -runtime "/tmp/Adobe AIR Installer Stand Alone.app/Contents/Frameworks" -silent -withRuntime -url file:///MyApp.air
    App installer completed successfully
    begin quitting

    Here's the output from .airinstall.log and .airappinstall.log
    machine:~ root# cat .airinstall.log
    Starting silent x1 install from file:///tmp/MyApp.air
    UI SWF load is complete
    stateRunningAppInstaller: appinstaller -runtime "/tmp/Adobe AIR Installer Stand Alone.app/Contents/Frameworks" -silent -withRuntime -url file:///tmp/MyApp.air
    App installer failed; exit code 7
    begin quitting
    machine:~ root# tail .airappinstall.log
    Starting silent app install of file:///tmp/MyApp.air
    UI SWF load is complete
    UI initialized
    Unpackaging to /private/var/folders/zz/zzzivhrRnAmviuee+++++++++++/TemporaryItems/FlashTmp0
    unpackaging is complete
    application is bound to side-by-side version 1.0
    application is bound to this version of the runtime
    app id MyApp
    pub id ---
    failed while unpackaging: [ErrorEvent type="error" bubbles=false cancelable=false eventPhase=2 text="Error #2004" errorID=2004]
    starting cleanup of temporary files
    application installer exiting

Maybe you are looking for