I am trying to load images into my display object and began with this
simple example taken directly from the Help system. Why is it giving
me the error "undefined property on pictLdr" on the lines indicated
(>>) ??

import flash.display.*;
import flash.net.URLRequest;
import flash.events.Event;

var container:Sprite = new Sprite();
addChild(container);
var pictLdr:Loader = new Loader();
var pictURL:String = "banana.jpg"
var pictURLReq:URLRequest = new URLRequest(pictURL);
>>pictLdr.load(pictURLReq);
>>pictLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded); 
function imgLoaded(e:Event):void {
    container.addChild(pictLdr.content); 
}



Reply via email to