[FONT=“Arial”]Is it possible to create a variable that references a loader content ?
For instance, in the example below, is it possible of having something like:
[COLOR=“Blue”]var LoaderContent:SOMETYPE = new SOMETYPE();
LoaderContent = pictLdr.content;[/COLOR]
**And then using LoaderContent variable instead ?
What type of variable should it be ?**
[COLOR=“Blue”]var container:Sprite = new Sprite();
addChild(container);[SIZE=“4”][/SIZE]
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(event:Event):void
{
container.addChild(pictLdr.content);
}[/COLOR]
[/FONT]