# Setting focus with an event

**URL:** https://forum.kirupa.com/t/setting-focus-with-an-event/41260
**Category:** flash
**Created:** [January 27, 2004, 3:34am UTC](https://forum.kirupa.com/t/setting-focus-with-an-event/41260 "2004-01-27T03:34:49Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![El\_Bicho](https://avatars.discourse-cdn.com/v4/letter/e/dbc845/32.png) [@El\_Bicho](https://forum.kirupa.com/u/El_Bicho)
#### Post date: [January 27, 2004, 3:34am UTC](https://forum.kirupa.com/t/setting-focus-with-an-event/41260/1 "2004-01-27T03:34:49Z")

</div>

I`m trying to set focus on a texfield after pressing an instance of a MC.

```auto

mc.onPress = function() {
	Selection.setFocus("textfield");
};

```

Why is this not working?

(It also doesen´t work with button.onPress, just with button.onRelease).

Thanks.
