getting error
TypeError: Error #2007: Parameter child must be non-null. at flash.display::DisplayObjectContainer/addChildAt() at fl.controls::ProgressBar/drawTrack() at fl.controls::ProgressBar/draw() at fl.core::UIComponent/callLaterDispatcher()
within cs5, any ideas. thanks. The animation imports fine, but I am getting that error without the progress bar being shown.
import fl.controls.ProgressBar;
var swfRequest:URLRequest = new URLRequest("animation2.swf"); //load animation file
var swfLoader:Loader = new Loader();
var progressBarr:ProgressBar = new ProgressBar();
progressBarr.source = swfLoader.contentLoaderInfo;
progressBarr.x = 27;
progressBarr.y = 155;
loadMovie();
function loadMovie():void{
addChild(progressBarr);
swfLoader.load(swfRequest);
}
swfLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, swfLoaded, false, 0, true); //when loaded call swfLoaded
//swfLoader.load(swfRequest);
//
function swfLoaded(event:Event):void{
swfMC.addChild(swfLoader); //add animation to swfMC movie clip
removeChild(progressBarr);
}
stop();