# Focus & Tab on MX2004 Components

**URL:** <https://forum.kirupa.com/t/focus-tab-on-mx2004-components/41594>\
**Category:** Uncategorized\
**Created:** [January 30, 2004, 11:12pm UTC](https://forum.kirupa.com/t/focus-tab-on-mx2004-components/41594 "2004-01-30T23:12:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![TylerNZ](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/tylernz/32/415_2.png) [@TylerNZ](https://forum.kirupa.com/u/TylerNZ)\
**Post date:** [January 30, 2004, 11:12pm UTC](https://forum.kirupa.com/t/focus-tab-on-mx2004-components/41594/1 "2004-01-30T23:12:02Z")

</div>

Ok, I know you can do this with TEXT FIELDS … but could someone tell me how to accomplish this with the component items!?

I’ve got a listener to listen for the reset button, so on the timeline I have this script:

[AS]  
clippy2Listener = new Object();  
clippy2Listener.click = function (evt){  
form.nameC.text = “”;  
form.emailC.text = “”;  
form.commentsC.text = “”;  
form.Selection.setFocus(“nameC”);  
}  
resetB.addEventListener(“click”, clippy2Listener);  
[/AS]

The form does clear, so the code is working, however, the focus isn’t setting.

Any ideas? And also with the tab indexing, can this be done with components.

THANKS TO ANYONE WHO CAN ANSWER!!! :thumb:
