Load SWFs in the background

i have multiple SWFs loading on multiple button clicks. so by default i have one.swf loaded on the screen. now when button two is clicked i load two.swf replacing one.swf. similarly when button three is clicked i load three.swf.

is there anyway i can preload two.swf, three.swf and other swf files in the background so that when user clicks on the button to view these, the swf is already loaded and takes no time to appear.

please let me know.

._visible always works, try false instead of 0.

Or simply move them off the stage, or delete them completely, then attach them when needed.

i tried- visible false also does not work… okay here is what i have:

i have 5 blank movie clips which i have on my main swf file.

_root.blank1.loadMovie(“one.swf”);
_root.blank2.loadMovie(“two.swf”);
_root.blank3.loadMovie(“three.swf”);
_root.blank4.loadMovie(“four.swf”);
_root.blank5.loadMovie(“five.swf”);

the movie clip blank1 loads by default on top of every blank movie clip (may be because of the stacking order)

now on click of button 2 i have this:
_root.blank1.loadMovie(“two.swf”);

similarly, on click of button 3 i have this
_root.blank1.loadMovie(“three.swf”);

so- now when i really have to view those SWF files, i load them on BLANK 1 movie clip and just to keep them loaded on the screen, i use blank2, blank3 etc.

and i was wondering if there was a better way…

And when you’ve tried the ._visible command, how are you targetting the MCs and from where?

i don’t know if i got ur question right- but like i said- blank1, the blank MC loads MC1 by default
_root.blank1.loadMovie(“MC1.swf”);

and when a button, button 2 is clicked i load MC2:
_root.blank1.loadMovie(“MC2.swf”);

not sure this is what u wanted to know.

No, what I wanted to know is when you’ve tried _visible = false; - how have you done it?

i tried both:

_root.blank1._visible = 0; and _root.blank1._visible = false;


_root.blank2.loadMovie(“two.swf”);
_root.blank2._visible = false;

so here i wanted to load the two.swf and at the same time- keep it hidden.

use onLoadStart or onLoadInit with movieClipLoader and apply the statement there.