Skip to main content
Participant
August 7, 2010
Answered

AIR works in CS5 flash debug, but does not work standalone.

  • August 7, 2010
  • 1 reply
  • 686 views

I have an application using the following code to access an XML file.

var file = File.desktopDirectory.resolvePath("wbconfig.xml");

var fileStream = new FileStream();

fileStream.open(file, FileMode.READ);

var configXML = new XML( fileStream.readUTFBytes(fileStream.bytesAvailable) );

fileStream.close();

// read soldout setting

trace( "XML = ", configXML );

if( configXML.soldoutEnable == "ON" )

soEnabled = true;

else

soEnabled = false;

It works fine in debug mode (ctrl + enter), After I create a stand alone .exe (alt + sht + F12). The .exe  file does not read the file. and does not set the soEnabled anymore. Can someone help me here?

I am running CS5, AIR 2 on windows XP. Thanks.

    This topic has been closed for replies.
    Correct answer

    This forum is for AIR Help, not any other type of AIR application. It sounds like you have another type of AIR application. I think you might want to try the regular AIR forum (probably listed under Flex).

    Becky Williams

    -- Sent from my Palm Pre

    On Aug 7, 2010 10:48 AM, farmerInCS5 <forums@adobe.com> wrote:

    I have an application using the following code to access an XML file.

     

    var file = File.desktopDirectory.resolvePath("wbconfig.xml");

    var fileStream = new FileStream();

     

    fileStream.open(file, FileMode.READ);

    var configXML = new XML( fileStream.readUTFBytes(fileStream.bytesAvailable) );

    fileStream.close();

     

    // read soldout setting

    trace( "XML = ", configXML );

    if( configXML.soldoutEnable == "ON" )

    soEnabled = true;

    else

    soEnabled = false;

     

    It works fine in debug mode (ctrl + enter), After I create a stand alone .exe (alt + sht + F12). The .exe  file does not read the file. and does not set the soEnabled anymore. Can someone help me here?

     

    I am running CS5, AIR 2 on windows XP. Thanks.

    1 reply

    Correct answer
    August 7, 2010

    This forum is for AIR Help, not any other type of AIR application. It sounds like you have another type of AIR application. I think you might want to try the regular AIR forum (probably listed under Flex).

    Becky Williams

    -- Sent from my Palm Pre

    On Aug 7, 2010 10:48 AM, farmerInCS5 <forums@adobe.com> wrote:

    I have an application using the following code to access an XML file.

     

    var file = File.desktopDirectory.resolvePath("wbconfig.xml");

    var fileStream = new FileStream();

     

    fileStream.open(file, FileMode.READ);

    var configXML = new XML( fileStream.readUTFBytes(fileStream.bytesAvailable) );

    fileStream.close();

     

    // read soldout setting

    trace( "XML = ", configXML );

    if( configXML.soldoutEnable == "ON" )

    soEnabled = true;

    else

    soEnabled = false;

     

    It works fine in debug mode (ctrl + enter), After I create a stand alone .exe (alt + sht + F12). The .exe  file does not read the file. and does not set the soEnabled anymore. Can someone help me here?

     

    I am running CS5, AIR 2 on windows XP. Thanks.