Raine
08-18-2009, 06:44 PM
Hi all. I'm using the progress bar and uiloader component in flasch cs3 to try and preload an external swf into my larger movie. I've been having trouble with this for such a long time I have to be close but when I test my movie I get the error
"1120: Access of undefined property request." with the source as "uiLoader.load(request);
this is the coding I have in my actions panel :
var imageURL:String = "portfolio.swf";
var imageURLRequest = new URLRequest(imageURL)
uiLoader.scaleContent = true;
uiLoader.load(request);
progressBar.source = uiLoader;
progressBar.addEventListener(ProgressEvent.PROGRES S, progressHandler);
progressBar.addEventListener(Event.COMPLETE, completeHandler);
function progressHandler (event:ProgressEvent):void{
status_txt.text = int(event.currentTarget.percentComplete) + "%";
}
function completeHandler (event:Event): void {
progressBar.removeEventListener(ProgressEvent.PROG RESS, progressHandler);
progressBar.removeEventListener(Event.COMPLETE, completeHandler);
removeChild(progressBar);
status_txt.text = "";
}
if anyone can point out what I'm doing wrong I would be so thankful!
"1120: Access of undefined property request." with the source as "uiLoader.load(request);
this is the coding I have in my actions panel :
var imageURL:String = "portfolio.swf";
var imageURLRequest = new URLRequest(imageURL)
uiLoader.scaleContent = true;
uiLoader.load(request);
progressBar.source = uiLoader;
progressBar.addEventListener(ProgressEvent.PROGRES S, progressHandler);
progressBar.addEventListener(Event.COMPLETE, completeHandler);
function progressHandler (event:ProgressEvent):void{
status_txt.text = int(event.currentTarget.percentComplete) + "%";
}
function completeHandler (event:Event): void {
progressBar.removeEventListener(ProgressEvent.PROG RESS, progressHandler);
progressBar.removeEventListener(Event.COMPLETE, completeHandler);
removeChild(progressBar);
status_txt.text = "";
}
if anyone can point out what I'm doing wrong I would be so thankful!