TellTarget and unload

I used TellTarget to link my buttons to different movies in my Flash website, but I have the problem of needing to unload the movie that is in the way (my movies appear at the same position).

How do i do this?

I managed to solve my problem (by putting the movies into one) but now since I scripted the buttons to both TellTarget and Unload, a new problem arised, which is the viewer will have to click on the button twice.

How do i solve this problem? (i think it may have to do with the ‘if’…)

my webpage is located at if you need to take a look at it.

You could have had the navigation be 1 movie & load all the other movies to a target area @ level zero. This would automatically replace the old movie with the new movie each time a button was pressed. I’m new to the game so just a thought. I encourage anyone to shoot the idea down if they feel it doesn’t work well.

Just got to your site finally (those popups gotta go buddy).
You could do it something like this?
Script this to the frame to initialize the variable
pressed = false

Then script this to the button
on (press) {
if (pressed == false) {
loadMovie ( url, target, method );
pressed = true
if (pressed == true) {
unloadMovie ( target );
pressed = true
This would allow the button to act like a toggle switch. If the button had already been pressed the movie would be unloaded. If the button had not been pressed the movie would be loaded. I think this is what you are trying to accomplish. Does this make sense?

yeah…makes some sense…

what i don’t get is where i’m supposed to script “pressed = false”
which frame?

What i have done so far is link the buttons to a movie and at different frames…

btw, how do i load movies on a certain target level? i thought of that when i found the unload action, but i can’t figure it out -_-

thanks for your help.

well those pop-ups can’t be helped…i’m only 14 and so am using free services…

however, since you don’t like pop-ups, you should download Pop-up stopper from Panicware :slight_smile: .

pressed = false; would go into frame 1 of the movie which holds the buttons themselves.

As for loading into levels, that’s pretty easy. Instead of using a movie clip as a target for the loadMovie(); command, use loadMovieNum(); and specify _level1 instead of the clip name.

Anything loaded into level1 after that point in time will automaticaly unload whatever was previously in that level. If you do it into level0 it will unload the movie that contains your buttons… if I’m thinking on your situation correctly.

Well my buttons are separate symbols…so I can’t do the scripting method (yet).

And since i’m using telltarget, how do I assigned the levels to be loaded into? where do i put LoadMovieNum()?

would it be easier if i sent you my .fla file? :stuck_out_tongue:

The buttons would look something like this.

on (press) {
loadMovieNum (www.mySwf.swf,_level1);:wink:

um…just realized u guys got it wrong =P.

what i meant by movie was a movie symbol, not a .swf file ~_~.

so…um…what should i do?

Why don’t you post the .fla somewhere so all can take a peak @ it?