# Focus events

**URL:** <https://forum.kirupa.com/t/focus-events/298826>\
**Category:** flash\
**Created:** [October 26, 2009, 4:41am UTC](https://forum.kirupa.com/t/focus-events/298826 "2009-10-26T04:41:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xFlashStudentx](https://avatars.discourse-cdn.com/v4/letter/x/57b2e6/32.png) [@xFlashStudentx](https://forum.kirupa.com/u/xFlashStudentx)\
**Post date:** [October 26, 2009, 4:41am UTC](https://forum.kirupa.com/t/focus-events/298826/1 "2009-10-26T04:41:27Z")

</div>

I’m trying to put the text back into a text field on FOCUS\_OUT one character at a time. On FOCUS\_IN, I want to remove the text one character at a time.

Here’s the basic code:

major.text = “ActionScript 3.0”;

major.addEventListener(FocusEvent.FOCUS\_IN, inFocus);  
major.addEventListener(FocusEvent.FOCUS\_OUT, outFocus);

function inFocus(event:FocusEvent):void  
{  
major.text="";// want to clear the text one character at a time  
}

function outFocus(event:FocusEvent):void  
{  
major.text=“ActionScript 3.0”;// want to put the text back in one character at a time  
}

I attached a fla. that does this in ActionScript 2.0, but I’m trying to do this in ActionScript 3.0 … Thanks for any

replies…
