# TellTarget and unload

**URL:** <https://forum.kirupa.com/t/telltarget-and-unload/2266>\
**Category:** flash\
**Created:** [April 30, 2002, 12:48am UTC](https://forum.kirupa.com/t/telltarget-and-unload/2266 "2002-04-30T00:48:52Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 30, 2002, 12:48am UTC](https://forum.kirupa.com/t/telltarget-and-unload/2266/1 "2002-04-30T00:48:52Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 30, 2002, 2:45am UTC](https://forum.kirupa.com/t/telltarget-and-unload/2266/2 "2002-04-30T02:45:28Z")

</div>

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 [hsa-dan.cjb.net](http://hsa-dan.cjb.net) if you need to take a look at it.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 30, 2002, 3:02am UTC](https://forum.kirupa.com/t/telltarget-and-unload/2266/3 "2002-04-30T03:02:51Z")

</div>

Hi,  
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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 30, 2002, 3:19am UTC](https://forum.kirupa.com/t/telltarget-and-unload/2266/4 "2002-04-30T03:19:58Z")

</div>

Hi,  
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  
}else{  
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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 30, 2002, 3:34am UTC](https://forum.kirupa.com/t/telltarget-and-unload/2266/5 "2002-04-30T03:34:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [April 30, 2002, 9:18pm UTC](https://forum.kirupa.com/t/telltarget-and-unload/2266/6 "2002-04-30T21:18:55Z")

</div>

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 🙂 .

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 1, 2002, 2:59am UTC](https://forum.kirupa.com/t/telltarget-and-unload/2266/7 "2002-05-01T02:59:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 1, 2002, 4:00am UTC](https://forum.kirupa.com/t/telltarget-and-unload/2266/8 "2002-05-01T04:00:22Z")

</div>

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? 😛_

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 1, 2002, 4:14am UTC](https://forum.kirupa.com/t/telltarget-and-unload/2266/9 "2002-05-01T04:14:37Z")

</div>

The buttons would look something like this.

on (press) {  
loadMovieNum ([www.mySwf.swf,\_level1);](http://www.mySwf.swf,_level1)😉  
}

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 3, 2002, 12:21am UTC](https://forum.kirupa.com/t/telltarget-and-unload/2266/10 "2002-05-03T00:21:30Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 3, 2002, 5:53pm UTC](https://forum.kirupa.com/t/telltarget-and-unload/2266/11 "2002-05-03T17:53:59Z")

</div>

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

Thanks
