PDA

View Full Version : loading swf from a button in an MC


marev
03-20-2002, 06:38 PM
Hi there,

I was happily loading external swf's via a button in the main timeline. The main timeline had a nifty border that served as a frame for the loaded swf's.

However, in an attempt to make my buttons slightly more snazzy, I placed them in an MC so they could be of the dropdown variety.

Trying to keep all things constant, I told the buttons to load the swf in the _parent directory (ie, the main timeline from the button's perspective) and now the loaded swf seems to replace everything in the main timeline... in other words, it loads but disregards the target and my nifty border.

Any thoughts or suggestions? My code for the buttons is below.

Thanks for any advice!

marev


on (release) {
_parent.unloadMovie ("chap1.swf");
_parent.unloadMovie ("chap2.swf");
loadMovie ("Main.swf", "_parent.target");
}

pixelwit
03-21-2002, 04:18 AM
_parent.unloadMovie ("chap1.swf");
When unloadMovie is used like this, it should remove "_parent".

loadMovie ("Main.swf", "_parent.target");
I'm not sure this line of code is reached, but if it is "_parent" may no longer exist and you may be loading your content into _level0.

Hope it helps,

-PiXELWiT
http://www.pixelwit.com

marev
03-21-2002, 05:29 PM
Yes indeedy, it all worked out just fine when I switched to:

unloadmovie("_parent.chap1");

et cetera.


Thanks!

marev