# Trouble loading external images

**URL:** https://forum.kirupa.com/t/trouble-loading-external-images/230580
**Category:** flash
**Created:** [June 27, 2007, 12:36pm UTC](https://forum.kirupa.com/t/trouble-loading-external-images/230580 "2007-06-27T12:36:25Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![4hov13](https://avatars.discourse-cdn.com/v4/letter/4/9de053/32.png) [@4hov13](https://forum.kirupa.com/u/4hov13)
#### Post date: [June 27, 2007, 12:36pm UTC](https://forum.kirupa.com/t/trouble-loading-external-images/230580/1 "2007-06-27T12:36:25Z")

</div>

I am trying to simply load an external .jpg, and I am simply not getting it. I am using Flash CS3. The following code was shamelessly lifted from Actionscript 3.0 Cookbook, and I removed the package and class info. The image “img1.JPG” is found in the same folder as the .fla file. Each time I run the program, I just get a white screen. Where I am going wrong? TIA for an answer. --4hov13 ================== import flash.display.Sprite; import flash.display.Loader; import flash.events.Event; import flash.net.URLRequest; // page 204 ascb var \_loader:Loader = new Loader(); function BitmapLoader() { \_loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete); \_loader.load(new URLRequest(“img1.JPG”)); } function onComplete(event:Event):void { var image:Bitmap = Bitmap(\_loader.content); var bitmap:BitmapData = image.bitmapData; addChild(image); } =================
