# Movieclip trouble!

**URL:** <https://forum.kirupa.com/t/movieclip-trouble/323567>\
**Category:** Uncategorized\
**Created:** [July 7, 2011, 9:36am UTC](https://forum.kirupa.com/t/movieclip-trouble/323567 "2011-07-07T09:36:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nuwa](https://avatars.discourse-cdn.com/v4/letter/n/e36b37/32.png) [@Nuwa](https://forum.kirupa.com/u/Nuwa)\
**Post date:** [July 7, 2011, 9:36am UTC](https://forum.kirupa.com/t/movieclip-trouble/323567/1 "2011-07-07T09:36:09Z")

</div>

i have a movieclip called main\_mc. inside this movieclip i’ve included a dynamic textfield called txt1 and another movieclip called themv.

what im trying to do here is, when the user clicks anywhere on the main\_mc, the string in txt1 will be converted into a movieclip instance name (txt1 will bare the string “themv”) and it will move the particular movieclip baring that instance name.

this is the code i have. but its throwing an error.

```auto

main_mc.addEventListener(MouseEvent.CLICK, gettxt);
function gettxt(event:MouseEvent):void
{
        main_mc.txt1.text = "themv";
	var myString:String;
	myString = main_mc.txt1.text;
	var myMV:MovieClip = this[myString];
	main_mc.myString.x = 0;
	main_mc.myString.y = 0;
	
}

```

And the error its throwing…  
TypeError: Error #1010: A term is undefined and has no properties.  
at Untitled\_fla::MainTimeline/gettxt()
