This is something I have done and forgotten so many times. So lets try add it here as a reminder.

To add an image to flash.

import flash.display.Loader;
import flash.net.URLLoader;

myImageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoaderReady);

var fileRequest:URLRequest = new URLRequest(“XXX.jpg”);
myImageLoader.load(fileRequest);

public function onImageLoaderReady(e:Event) {
       myContainer.addChild(myImageLoader);
}

Credits to Kirupa once again, a site with so much useful information
About

About Chi Wai LI

Happily accept I’m a #geek but hate to sit still all day. Digital Creative and Founder of Getfit.hk. #HongKong

Say something constructive