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.
system
February 7, 2004, 7:52am
2
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
system
February 8, 2004, 6:03am
3
what about for jpegs? forgot to mention that part sorry
system
February 8, 2004, 12:54pm
4
Yeah, it’s also possible for jpgs. Those have to be preloaded from the main movie though, but yes
system
February 8, 2004, 1:34pm
6
Oh, you also wanted to know how ?
system
February 8, 2004, 1:51pm
7
sure, if it’s not too much.
I think I’ve got it sussed, but I am curious to see how others do it.
system
February 8, 2004, 2:12pm
8
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.")
}
}