Hi -
I’m trying to make a button that will load a movie “m1.swf” intp a movieclip myMC
I can do that - the thing is, i want to make a progress bar thart will say how much is loaded. Ive seen it done, but when i try it, it doesnt work.
Can somebody please help me - thanks!
system
October 22, 2003, 7:41am
2
Thx very much!! An excellent introduction!
Dorian
system
September 6, 2004, 2:03am
3
thebigcheese:
[AS]_root.loadMeAMovie = function(mname) {
_root.preloader_clips.front_bar._width = 0;
_root.myMC1.loadMovie(mname);
_root.preloader_clips.onEnterFrame = function() {
_root.preloadMC(_root.myMC1);
};
};
_root.preloadMC = function(mc) {
var bLoaded = mc.getBytesLoaded();
var bTotal = mc.getBytesTotal();
var twidth = _root.preloader_clips.back_bar._width;
_root.preloader_clips.front_bar._width = twidth*bLoaded/bTotal;
if (bLoaded == bTotal && bTotal>0) {
delete this.onEnterFrame;
} else if (bLoaded == -1) {
//failed load
}
};
//***************Load the default movie
_root.loadMeAMovie(“home.swf”, _root.hcolor);[/AS]
myMC1 is the movie to load into
preloader_clips.front_bar is the loader bar
preloader_clips.back_bar is the original bar width
this code should work - it does for me - sorry it toook so long i was busy
Hi Big Cheese,
This looks like what I’m trying to do. Could you explaine it a little? I’m trying to load different movies into a base movie and have a loader give a percentge of the .swf loaded.
What does _root.loadMeAMovie(“home.swf”, _root.hcolor); do?
Anything you could do to clariafy this would be great. I think I’m close, just can’t get it to work.
Thank you!