# MC Targeting

**URL:** <https://forum.kirupa.com/t/mc-targeting/280996>\
**Category:** programming\
**Created:** [February 3, 2009, 7:47pm UTC](https://forum.kirupa.com/t/mc-targeting/280996 "2009-02-03T19:47:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aur](https://avatars.discourse-cdn.com/v4/letter/a/ce73a5/32.png) [@Aur](https://forum.kirupa.com/u/Aur)\
**Post date:** [February 3, 2009, 7:47pm UTC](https://forum.kirupa.com/t/mc-targeting/280996/1 "2009-02-03T19:47:38Z")

</div>

Ok, so I want to make an rpg style game. The fighting system would need targeting, thus why i’m here.  
Basically I want it to work like this: If i click on the enemy, a target arrow or circle pops up around him, but if i click off the target arrow/circle, ect. disappears.  
I just want to get this done first i’ll start worrying about other stuff soon enough.

Here is what I have, but its not working.

A mc named Ball ( who would be the enemy) with the actionscript

```auto
on (press) {
	focus == true;
}

```

a text box to let me know if it is targeted. its a dynamic text box with the var and instance of txtfocus.

and finally on the timeline i have

```auto
if (focus = true) {
	txtfocus = "sauce";
} else {
	focus = false;
}

```

So far its not working, any tips or help? or even a way to do it better?  
thanks–
