# I'm going slightly mad

**URL:** <https://forum.kirupa.com/t/im-going-slightly-mad/10992>\
**Category:** Uncategorized\
**Created:** [January 10, 2003, 9:33am UTC](https://forum.kirupa.com/t/im-going-slightly-mad/10992 "2003-01-10T09:33:45Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Halil](https://avatars.discourse-cdn.com/v4/letter/h/7ea924/32.png) [@Halil](https://forum.kirupa.com/u/Halil)\
**Post date:** [January 10, 2003, 9:33am UTC](https://forum.kirupa.com/t/im-going-slightly-mad/10992/1 "2003-01-10T09:33:45Z")

</div>

Can anyone tell me if it is possible to TellTarget based on a focus event and how?

I’m going slightly mad.

---

<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 10, 2003, 10:14am UTC](https://forum.kirupa.com/t/im-going-slightly-mad/10992/2 "2003-01-10T10:14:23Z")

</div>

Well, tellTargets have been depreciated in Flash MX, so it’s generally better to avoid using them…

---

<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 10, 2003, 11:30am UTC](https://forum.kirupa.com/t/im-going-slightly-mad/10992/3 "2003-01-10T11:30:17Z")

</div>

I use tellTarget a lot, what do you use as a substitute?

---

<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 10, 2003, 11:57am UTC](https://forum.kirupa.com/t/im-going-slightly-mad/10992/4 "2003-01-10T11:57:52Z")

</div>

Tell targets are easely replaced by this:

```auto
_root.pathTo.target.action;

```

or

```auto
_parent.pathTo.target.action;

```

or

```auto
_level#.pathTo.target.action;

```

…

[SIZE=1] **Note:**  
**\_root** refers to the main Timeline;  
**\_parent** to refer to a movie clip in which the current movie clip is nested;  
**\_level#** to target a loaded movie at the level assigned by #. [/SIZE]

---

<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 10, 2003, 11:58am UTC](https://forum.kirupa.com/t/im-going-slightly-mad/10992/5 "2003-01-10T11:58:05Z")

</div>

Just the dot notation, so like:

```php
onPress() {
_root.movie.gotoAndPlay(2)
}

```

Instead of the longer:

```php
onPress() {
tellTarget(_root.movie){
gotoAndPlay(2)
}
}

```

Use full stops to separate them, and you can even use the targetting icon in Normal Mode to select the movie and it’ll write the path for you.

---

<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 10, 2003, 11:59am UTC](https://forum.kirupa.com/t/im-going-slightly-mad/10992/6 "2003-01-10T11:59:54Z")

</div>

☹

---

<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 10, 2003, 1:04pm UTC](https://forum.kirupa.com/t/im-going-slightly-mad/10992/7 "2003-01-10T13:04:40Z")

</div>

Thanks to both of you, but I’m still stuck with my original problem.  
Getting an event like VB’s gotfocus to tell my movieclip to play when the window has focus.

The animation I created is 3d and uses a lot of processing power, so whenever an app is opened in front of it I stop the animation so the app can run faster. Now I need to start that animation up again everytime it’s own window has focus over the app.

Can you help me with that?

---

<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 10, 2003, 1:11pm UTC](https://forum.kirupa.com/t/im-going-slightly-mad/10992/8 "2003-01-10T13:11:05Z")

</div>

```auto
myMovieClip.onKillFocus = function (newFocus) {
statements;
}; 

```

and,

```auto
myMovieClip.onSetFocus = function(oldFocus){
statements;
};

```

:-\
