Preloader Help!

Is there a way to create a 1 preloader that can be used to preload external movieclip into the main movie? Not at the same time but only when button is click.

Hello again familiar stranger. Yes there is a way, I’m not exactly sure, but you use it in a similar fasion, you would have something like:

percent = Math.round((movieclip.getBytesLoaded()/movieclip.getBytesTotal())*100) add "%"

and a text box with percent as the var.

Let me check my big flash book.

Alright, I’ve got it.

Create an empty movieClip where you want the top left hand corner of the loaded movie clip to appear - we will name it “spotload”.

now, add this to the script that will trigger the loading of the movieclip:

loadMovie("movieclipname.swf", _root.spotload)

in a seperate blank movieclip, add this:

onClipEvent(enterFrame){
percent = Math.round((movieclip.getBytesLoaded()/movieclip.getBytesTotal())*100);
}

then create a textfeild somewhere with var as: percent.

that should do the trick.

First create an empty movie clip and give it an instance name of container_mc. Then lets call your button my_button. Now create a textfield and give it a variable name percent.
On the main timeline, place the following code:[AS]function preload(clip) {
if (!loaded) {
if (clip.getBytesLoaded>0 && clip.getBytesLoaded>=clip.getBytesTotal) {
loaded = true;
}
var percent = Math.round((clip.getBytesLoaded()/clip.getBytesTotal())*100);

}

}
my_button.onPress = function() {
container_mc.loadMovie(“yourmovie.swf”);
};[/AS]Now, apply the following code on your container_mc:


onClipEvent (enterFrame) {
        if (this._url != _root._url) {
                _parent.preload(this);
        }
}

thanks for the replies guys! if do those is this what will gonna happen?

if i click the home “button”, that preloaders come out, and if i click on “profile” for instance, that preloader will also comes up as well?

thanks i’ll try those you guys advised me to do!