# hitTest does not produce dynamic text

**URL:** https://forum.kirupa.com/t/hittest-does-not-produce-dynamic-text/176161
**Category:** Uncategorized
**Created:** [January 20, 2006, 9:02pm UTC](https://forum.kirupa.com/t/hittest-does-not-produce-dynamic-text/176161 "2006-01-20T21:02:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![lariat1997](https://avatars.discourse-cdn.com/v4/letter/l/df705f/32.png) [@lariat1997](https://forum.kirupa.com/u/lariat1997)
#### Post date: [January 20, 2006, 9:02pm UTC](https://forum.kirupa.com/t/hittest-does-not-produce-dynamic-text/176161/1 "2006-01-20T21:02:33Z")

</div>

Hey all,

I have a movieclip that uses the hitTest function to lock into a postion when dragged to the appropriate location. I have a text field that I want to display “Good Job”. But my code below does not do it.

I tried setting the if statement to say that if my mc’s x is at 489, then say “Good Job!”, else display nothing. The AS is on the main timeline.

i[COLOR=Blue]f(this.MIDSLVT\_mc.\_x==489){  
this.txtScenario.text = “Good Job!”;  
}else{  
this.txtScenario.text = " ";  
}

[COLOR=Black]Thanks.[/COLOR]  
[/COLOR]
