AIR works in CS5 flash debug, but does not work standalone.
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.