# Handcursor on dynamic textfield

**URL:** <https://forum.kirupa.com/t/handcursor-on-dynamic-textfield/288902>\
**Category:** flash\
**Created:** [May 22, 2009, 4:03pm UTC](https://forum.kirupa.com/t/handcursor-on-dynamic-textfield/288902 "2009-05-22T16:03:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dimitree](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/dimitree/32/2530_2.png) [@Dimitree](https://forum.kirupa.com/u/Dimitree)\
**Post date:** [May 22, 2009, 4:03pm UTC](https://forum.kirupa.com/t/handcursor-on-dynamic-textfield/288902/1 "2009-05-22T16:03:18Z")

</div>

Hello, I have a menu made only with the use of dynamicTextfield and XML. How can I place Handcursor in this textfield so it look like a typical menu button?  
I tried this solution and it doen’t work properly…

```auto
	

function createMainText(mainText:String, mainLink:String, xPosition:Number, yPosition:Number, indexNumber:Number):void {
	var dynText:TextField = new TextField();

	dynText.name="mainLink"+indexNumber.toString();
	dynText.selectable=false;
      dynText.x=xPosition;
	dynText.y=yPosition;
	dynText.autoSize=TextFieldAutoSize.LEFT;
	dynText.text=mainText;
	dynText.setTextFormat(textFormatMain);
	
	var MC_text:MovieClip = new MovieClip();//try to attach textfiled into a movieclip
	
	MC_text.buttonMode = true; 
	MC_text.useHandCursor = true;
	MC_text.addChild(dynText);
	 
	    
	addChild(MC_text);
	setChildIndex(dynText,numChildren - 1); /*this line is that doesnt fit with the use of movieclip I think*/

         dynText.addEventListener(MouseEvent.MOUSE_OVER, subLinksShow);
	dynText.addEventListener(MouseEvent.MOUSE_OVER, buttonModeTrue);
	dynText.addEventListener(MouseEvent.MOUSE_OUT, buttonModeFalse);
	getChildByName("mainLink"+indexNumber.toString()).addEventListener(MouseEvent.CLICK, CallArg.create(gotoSub, mainLink));

}

```

I can’ t sort it out!
