Calling MC with preloader

in this tutorial on Kirupa : http://www.kirupa.com/developer/mx/full_site.htm
each time u click a button, it calls and load an external MC and play it in the main MC, can a preloader be added prior to any loading of external MCs ? how to add it if all external MCs have only one frame in all layers ??

thx.

Did you check the preloader tutorials?

pom :slight_smile:

sorry i didnt mean external MCs, i meant external SWFs files.
the tutorial is to be done inside an MC, not for external SWF.

http://www.kirupaforum.com/showthread.php?s=&threadid=15699

i got it, but where exactly should i put this ?
i guess in the external SWF, but where, which layer and which frame ?

i tried to add this code to each button, i got many errors. can u guide me thru it plz ??

?!! where do i add this code man !!! i tried all places it cant seem to work …

Check the example.

u got me confused.
this is my issue:

i have the main page, empty. it has the background, the buttons and an empty target MC where the external SWF will load.

the external SWFs are the 5 sections, or pages, of my website. when u click on any of the 5 buttons that i have, it calls the external SWF and load it in the target MC in the main page.

and what i want is to add that preloader prior to the loading of any of those external SWFs.

now where should i put ur code? thats where i got lost.

thx buddy

If you have the function inserted in your First frame, then you can just call it from any button, for example:

myButton.onRelease = function(){
preload(“file.swf”, depth, x, y);
}