# Clickable textfield

**URL:** <https://forum.kirupa.com/t/clickable-textfield/259074>\
**Category:** flash\
**Created:** [April 30, 2008, 8:44pm UTC](https://forum.kirupa.com/t/clickable-textfield/259074 "2008-04-30T20:44:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![hybrid9](https://avatars.discourse-cdn.com/v4/letter/h/b38774/32.png) [@hybrid9](https://forum.kirupa.com/u/hybrid9)\
**Post date:** [April 30, 2008, 8:44pm UTC](https://forum.kirupa.com/t/clickable-textfield/259074/1 "2008-04-30T20:44:02Z")

</div>

Ahoi, ahoi!

Ok, here’s my issue. I have a Sprite that contains 3 dynamic textfields that act as my navigation. I populate the individual textfields from an xml document. My problem is that I want the text to be clickable by showing the hand cursor.

I can get the hand cursor to show, but I can’t get the listener to fire with the MOUSE\_DOWN. If I change the event listener to be that of the Sprite object, it works, but not the way I want it.

Here’s my code

```auto

var container:Sprite = new Sprite();
container.x = container.y = 100;
container.buttonMode = true;
container.useHandCursor = true;
container.mouseChildren = false;

var mytext:TextField = new TextField();
mytext.text = "HELLO WORLD!";
mytext.name = "textBox1";
mytext.mouseEnabled = true;
mytext.selectable = false;
mytext.addEventListener(MouseEvent.MOUSE_DOWN, geturl, false, 0, false)

container.addChild(mytext);
addChild(container);

function geturl(evt:Event):void {
    trace(evt.target);
}

```

How do I make the textfields clickable? What am I missing?

Me baffled. :puzzle:
