Loading an xml synchronous with Adobe Air
Posted: May 14th, 2008 | Author: Ivan Valadares | Filed under: Actionscript3, Adobe AIR, Code | No Comments »I usually work in desktop application and we like it or not flash is optimized for the web so normally we have to put complete event ever time we load anything, and it’s logic, because for the web things have to be asynchronous but for desktop applications they not.
We have already load text and xml files synchronous and done some things with sql lite synchronous, I think for now images and sounds can’t be done, because even if you get the bytes, you always need to invoke loadBytes method from the loader and put a complete event listener, fuck! lol, I hope that in the next release of flash the loader have an synchronous method of load the bytes.
There it’s a class to load an xml file synchronous.
How to use:
var configXml:XML = XmlLoader.load("Config.xml");
Leave a Reply