views:

49

answers:

1

I put a progress bar on my stage. I called it "this". It is put on frame'1'. on frame'2' there is a flvplayback component.When people go to the application it does'nt load.
my code is below:

myProgressBar.source = this.loaderInfo;
this.loaderInfo.addEventListener(Event.COMPLETE, loadComplete);
function loadComplete(evt){
    gotoAndStop(2);
}

Thanx

A: 

"this" is a reserved keyword in actionscript which references the currently scoped object. You NEVER want to name something "this".

You might also want to try posting additional code which shows how you are setting up your Loader.

Most likely you want to do something like this:

var _loader:Loader = new Loader();
myProgressBar.source = _loader.loaderInfo;
_lodaer.loaderInfo.addEventListener(Event.COMPLETE, loadComplete);
_loader.load(new URLRequest("myFlv.flv"));
sberry2A
You will likely also want to listen for IOError and/or other error events to catch things (such as if you specify the wrong filename, etc., or can't otherwise access the file. But definitely don't name it this.
James