Hey,
I am trying to load an image into a movieclip and then change the width of the movieclip. The problem I am having is that when I do this the image is no longer visible.
Any help is greatly appreciated
import flash.display.*;
import flash.net.URLRequest;
import flash.events.Event;
var container:MovieClip = new MovieClip();
addChild(container);
var pictLdr:Loader = new Loader();
var pictURL:String = "image.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);
}
//change the width
//If I comment out this line I can see the image fine.
container.width = 100;