# Text Input Component - onChanged. How?

**URL:** https://forum.kirupa.com/t/text-input-component-onchanged-how/167845
**Category:** flash
**Created:** [November 1, 2005, 4:56pm UTC](https://forum.kirupa.com/t/text-input-component-onchanged-how/167845 "2005-11-01T16:56:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![DESIGN\_GEEZER](https://avatars.discourse-cdn.com/v4/letter/d/da6949/32.png) [@DESIGN\_GEEZER](https://forum.kirupa.com/u/DESIGN_GEEZER)
#### Post date: [November 1, 2005, 4:56pm UTC](https://forum.kirupa.com/t/text-input-component-onchanged-how/167845/1 "2005-11-01T16:56:27Z")

</div>

Hi everyone,

I’m trying to shift the focus from on TextInput component to another when you enter more than 3 characters in the first field. For arguements sake lets call them “TextOne” and “TextTwo”.

The way I used to do it was by placing an input text field on the stage and setting up the script.

```auto
 
TextOne.onChanged = function() {
if(TextOne.length > 3) {
Selection.setFocus("TextTwo");
}
}

```

Works like a charm. Then come Flash MX2004 Components. Now, even though the components have the same instance names nothing happens.

Why do they have to mess with a good thing? And is there a way around this?

Thanks for any help.
