Dynamic percentage based preloade possible?

Is it possible to have a preloader (external) which displays percentage loaded etc for dynamically loaded MCs?

I know about all the tutes for transitions etc, but they just use a flashing “loading” bit of text.

Please forgive me, as I am posting this while attempting it in Flash muself, so I may find the solution, just thought two ways are better than one.

:slight_smile:

Yes, it is. You can just place the preloader inside the external swf. When it is then being loaded into the main movie, it will start preloading itself.

You can also preload it through the main movie, but it’s easier to do it from the external swf itself, for example with Lost’s famous preloader :slight_smile:

what about for jpegs? forgot to mention that part sorry

:slight_smile:

Yeah, it’s also possible for jpgs. Those have to be preloaded from the main movie though, but yes :slight_smile:

any more clues?

Oh, you also wanted to know how ?

sure, if it’s not too much.

I think I’ve got it sussed, but I am curious to see how others do it.

I mostly use something like this:


loader.loadMovie("image.jpg");
this.onEnterFrame = function(){
	var loaded = loader.getBytesLoaded();
	var total = loader.getBytesTotal();
	var percent = (loaded/total)*100;
//loadbar._width = ....
	if(loaded == total && total > 0){
		delete this.onEnterFrame
		trace("Loaded.")
	}
}

cheers big ears