# Setting focus on an input field when it enters the frame

**URL:** <https://forum.kirupa.com/t/setting-focus-on-an-input-field-when-it-enters-the-frame/96837>\
**Category:** Uncategorized\
**Created:** [December 14, 2003, 11:18am UTC](https://forum.kirupa.com/t/setting-focus-on-an-input-field-when-it-enters-the-frame/96837 "2003-12-14T11:18:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bodom78](https://avatars.discourse-cdn.com/v4/letter/b/aca169/32.png) [@Bodom78](https://forum.kirupa.com/u/Bodom78)\
**Post date:** [December 14, 2003, 11:18am UTC](https://forum.kirupa.com/t/setting-focus-on-an-input-field-when-it-enters-the-frame/96837/1 "2003-12-14T11:18:35Z")

</div>

I can set the focus to a input field via a button using:

```php

on (release) {
	Selection.setFocus("Name");
}

```

but how can envoke this without a button press? My animation plays and the text fields appear in the final frame and this is where I want it to setFocus. I tried [COLOR=blue]Selection.setFocus(“Name”);[/COLOR] on the main timeline but that dont seem to work.

Cheers.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [December 15, 2003, 12:08am UTC](https://forum.kirupa.com/t/setting-focus-on-an-input-field-when-it-enters-the-frame/96837/2 "2003-12-15T00:08:14Z")

</div>

Yes it does seem to work, I relized that Flash MX 2004 must be to blame, it works fine in MX but not in 2004. Any ideas on how to get it to work in 2004?
