# setFocus not working

**URL:** <https://forum.kirupa.com/t/setfocus-not-working/158635>\
**Category:** flash\
**Created:** [August 10, 2005, 9:07pm UTC](https://forum.kirupa.com/t/setfocus-not-working/158635 "2005-08-10T21:07:43Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pln1llyln0clc3y](https://avatars.discourse-cdn.com/v4/letter/p/e47774/32.png) [@pln1llyln0clc3y](https://forum.kirupa.com/u/pln1llyln0clc3y)\
**Post date:** [August 10, 2005, 9:07pm UTC](https://forum.kirupa.com/t/setfocus-not-working/158635/1 "2005-08-10T21:07:43Z")

</div>

I have a swf that contains an email form. I used Selection.setFocus to give focus to the first field when the form loads. This works fine when I test it in Flash (ctrl+enter) but when I publish it to an HTML it doesn’t work in the HTML page. Can anyone explain why?
