Your code didn't match the description.

I'd take the bitmapdata, write it to a bytearray, pass the bytearray across 
shared events, loadbytes the bytearray on the other side.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.<http://www.adobe.com/>
Blog: http://blogs.adobe.com/aharui

From: [email protected] [mailto:[email protected]] On Behalf 
Of rob_mcmichael
Sent: Thursday, April 09, 2009 1:13 AM
To: [email protected]
Subject: [flexcoders] Marshall Plan: Loading images from byteArray





Hi all,

I am trying to work around a sub application in AIR not being able to load in 
images at runtime.

I am trying to get the parent application to load the image, convert it to a 
byte array and then pass it through the shared events to the sub application.

At this point I then want the sub application to load that image.

I am trying to do this by using a swf loader like so:
==============
var ba:ByteArray = new ByteArray();
ba.writeUTFBytes(myImageAsByteString);
ba.position = 0;
mySwfLoader.content.loaderInfo.loader.loadBytes( ba );
==============

The problem is I get a security violation from the sub application.
==============
Main Thread (Suspended: SecurityError: Error #2121: Security sandbox violation: 
LoaderInfo.loader: app-storage:/subApplication.swf cannot access 
app:/parentApplication.swf. This may be worked around by calling 
Security.allowDomain.)
==============

I am trying to work around this by passing BitmapData.

Please let me know if you have any ideas.

Thanks

Rob

Reply via email to