Tuesday, March 31, 2009

How to load an image on to the Stage

var pictLdr:Loader = new Loader();
var pictURL:String = "http://www.spore.com/static/image/500/308/917/500308917068_lrg.png";
var pictURLReq:URLRequest = new URLRequest(pictURL);
pictLdr.load(pictURLReq);
pictLdr.x = 200;
addChild(pictLdr);

0 comments: