Groups | Blog | Home
all groups > flash actionscript > september 2006 >

flash actionscript : Load swf on existing swf


Amyrs
9/16/2006 3:52:45 PM
I've designed a site using an external loader, on which lies buttons that will
load different swfs. They are called as follows:

b1.onRelease = function() {
loader._visible = true;
mcl.loadClip("Home_page.swf", holder);
mcl.unloadClip(1);

and work fine. The problem I am having is that I'll attempt to call the same
function from a button on a page within the holder:

Enter.onRelease = function() {
_level0.mcl.loadClip("Contact_us.swf", 1);
};

It calls the correct page, but loads it on top of the existing page, whereas
any functional buttons on the underneath page still work, but aren't visible.
I'll mouse over them, and can click on them. My thinking was that if I called
this page with button "Enter", that it would unload the underneath page, which
was originally loaded by:

b1.onRelease = function() {
loader._visible = true;
mcl.loadClip("Home_page.swf", holder);
mcl.unloadClip(1);

All I need is the script to get the bottom swf to unload, so that the only swf
in the holder is the one being called by a button. I need "Home_page.swf" to
unload when "Contact_us.wsf" is called by a button on "Home_page.swf".

Thanks in advance,
Aaron
kglad
9/16/2006 4:20:50 PM
you can't load more than 1 swf into a holder movieclip at any one time. so, if
you have more than 1 swf on-stage at any one time it's because they were loaded
into different target (or holder) movieclips.
AddThis Social Bookmark Button