# tellTarget alternative?

**URL:** <https://forum.kirupa.com/t/telltarget-alternative/10615>\
**Category:** flash\
**Created:** [January 4, 2003, 5:33am UTC](https://forum.kirupa.com/t/telltarget-alternative/10615 "2003-01-04T05:33:38Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![LoungeActx](https://avatars.discourse-cdn.com/v4/letter/l/71c47a/32.png) [@LoungeActx](https://forum.kirupa.com/u/LoungeActx)\
**Post date:** [January 4, 2003, 5:33am UTC](https://forum.kirupa.com/t/telltarget-alternative/10615/1 "2003-01-04T05:33:38Z")

</div>

I know that tellTarget is deprecated in Flash MX, what is the best alternative?

---

<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:** [January 4, 2003, 6:19am UTC](https://forum.kirupa.com/t/telltarget-alternative/10615/2 "2003-01-04T06:19:14Z")

</div>

\_root.yourMovieClip.gotoAndPlay(frame#)

That line replaces tellTarget. It is so much easier, and better in my opinion.

---

<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:** [January 4, 2003, 6:31am UTC](https://forum.kirupa.com/t/telltarget-alternative/10615/3 "2003-01-04T06:31:31Z")

</div>

with(target){  
}

is the ‘alternative’ though you cannot set variables/properties within the with, you can only reference and use them (or re-set, just cant make new ones)

---

<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:** [January 4, 2003, 6:41am UTC](https://forum.kirupa.com/t/telltarget-alternative/10615/4 "2003-01-04T06:41:43Z")

</div>

Is the with statement really worth it with the dot syntax version of \_root.movieClip.gotoAndPlay(frame#) and such?

---

<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:** [January 4, 2003, 6:56am UTC](https://forum.kirupa.com/t/telltarget-alternative/10615/5 "2003-01-04T06:56:54Z")

</div>

not usually. I hardly ever use with, its best with long target names though. However, in that case, I typically just set a small variable name to be the long path and use that instead

my = \_root.box.instrument.player.girlfriend;  
my.\_x += my.speed;

etc

---

<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:** [January 4, 2003, 7:02am UTC](https://forum.kirupa.com/t/telltarget-alternative/10615/6 "2003-01-04T07:02:23Z")

</div>

Yeah, that is what I do too.

I have never used a with statement, even though I knew how to use them, just never have. My methods were always easier.

---

<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:** [January 4, 2003, 3:47pm UTC](https://forum.kirupa.com/t/telltarget-alternative/10615/7 "2003-01-04T15:47:47Z")

</div>

thanks guys, it works great!
