# External images only loads in publish preview

**URL:** <https://forum.kirupa.com/t/external-images-only-loads-in-publish-preview/312119>\
**Category:** Uncategorized\
**Created:** [July 26, 2010, 9:53am UTC](https://forum.kirupa.com/t/external-images-only-loads-in-publish-preview/312119 "2010-07-26T09:53:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![deathbite88](https://avatars.discourse-cdn.com/v4/letter/d/c89c15/32.png) [@deathbite88](https://forum.kirupa.com/u/deathbite88)\
**Post date:** [July 26, 2010, 9:53am UTC](https://forum.kirupa.com/t/external-images-only-loads-in-publish-preview/312119/1 "2010-07-26T09:53:04Z")

</div>

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

```auto
e.target.content

```

doesn’t exist in the published version.

PS: i have set the local playback security to ‘network’

my code:

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

```
