Preloader

Hello, well this is my question, i made up a preloader but am having some problems with the action script, well this is it

var myMCL:MovieClipLoader = new MovieClipLoader ();
var myListener:Object = new Object ();

myMCLaddListener(myListener);

myListener.onLoadProgress = function(target_mc:MovieClip, bytesLoaded:Number, bytesTotal:Number) {
var Loaded:Number = Math.round ((bytesLoaded/bytesTotal) * 100);
progressBar.gotoAndStop(loaded);
}

myMCL.loadClip(“http://www.lynda.com/flash8esst/clouds-lrg.jpg”, “container”);

Also, this has nothing to do with actionscript, when i preview in web page view(F12) nothing happens, so any1 could help me fix that…

[AS]
myMCLaddListener(myListener);[/AS]you forgot a period, might be a typo :slight_smile:

but the problem is to remove the container from quotes. [AS]myMCL.loadClip(“http://www.lynda.com/flash8esst/clouds-lrg.jpg”, container);[/AS]

still isn’t working, flash need setup something so it can have access to internet?

Also you need to change ‘loaded’ to ‘Loaded’. [AS]progressBar.gotoAndStop(loaded);[/AS] Other than that, make sure your scope for “container” is correct.

here goes my .fla if you can find any error…

ok this may seem like a pretty noobish respose but are u sure u dont mean:

gotoAndStop("loaded");
 
//rather than
 
gotoAndStop(loaded);

guessin not but thought id mention it xD

The Lee

You will not be able to preview the preloaders using the movieClipLoader. even if you preview with simulated download, the clip is still loaded instantly. The only way to preview preloaders created with this method is to upload to the internet, and view.

Also ignore what i said lol, just actually read the code lol :stuck_out_tongue: