# Leaving TextField

**URL:** <https://forum.kirupa.com/t/leaving-textfield/291512>\
**Category:** flash\
**Created:** [June 30, 2009, 7:29pm UTC](https://forum.kirupa.com/t/leaving-textfield/291512 "2009-06-30T19:29:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mavi](https://avatars.discourse-cdn.com/v4/letter/m/258eb7/32.png) [@mavi](https://forum.kirupa.com/u/mavi)\
**Post date:** [June 30, 2009, 7:29pm UTC](https://forum.kirupa.com/t/leaving-textfield/291512/1 "2009-06-30T19:29:23Z")

</div>

Hi everybody.

I want a few variables to be updated when MyTextField is left.

I tried this:  
Code:  
myTextField.addEventListener(Event.MOUSE\_LEAVE, update\_everything)  
function update\_everything(e:Event):void{  
bla bla bla  
}  
But that didnt work…  
My function should also work if the text field is left with TAB.

Hope somebody can help  
Thanx
