# 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/37787>\
**Category:** flash\
**Created:** [December 14, 2003, 11:18am UTC](https://forum.kirupa.com/t/setting-focus-on-an-input-field-when-it-enters-the-frame/37787 "2003-12-14T11:18:35Z")\
**Posts on this page:** 1\
**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/37787/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.
