Hey everybody,
i’m trying to load some external images of the web.
when i publish preview my swf the image loads.
but when i open the swf or html the image doesnt apear.
i have tested every thing and found out
e.target.content
doesn’t exist in the published version.
PS: i have set the local playback security to ‘network’
my code:
function loadImage(imageString:String)
{
var imageLoader:Loader = new Loader();
var imageURL:String = imageString;
var imageRequest:URLRequest = new URLRequest(imageURL);
imageLoader.load(imageRequest);
imageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onPictureLoaded);
}
function onPictureLoaded(e:Event)
{
var newBitmapData:BitmapData = e.target.content.bitmapData; // <-- this doesn't work (e.target.content doesn't exist)
var newBitmap:Bitmap = new Bitmap(newBitmapData);
this.addChild(newBitmap);
}
loadImage("http://www.google.nl/images/srpr/nav_logo13_175pxlogo.png");