“Be inspired, enjoy your work, keep learning and never forget to play.” — gskinner

“SecurityError: Error #3015: Loader.loadBytes() is not permitted to load content with executable code.”

Posted: May 14th, 2008 | Author: Ivan Valadares | Filed under: Actionscript3, Adobe AIR, Code | 5 Comments »

In the last month I thought Adobe had protect the loadBytes method from the loader so that only “regular” files like mp3, jpg, etc could be loaded, lots of good library’s like Benjamin Dobler wav reader stop working. What I think it is that in last version of flash player Adobe turn allowLoadBytesCodeExecution to false. If you see Adobe documentation they have written “Note: This API is likely to be replaced in a future release of AIR.” If anyone knows what really happen let me know. Now the good part, to solve that is simple, you only need to set allowLoadBytesCodeExecution to true.


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");