# Any quick fix for this? onEnterFrame problem

**URL:** <https://forum.kirupa.com/t/any-quick-fix-for-this-onenterframe-problem/285443>\
**Category:** Uncategorized\
**Created:** [March 31, 2009, 9:40pm UTC](https://forum.kirupa.com/t/any-quick-fix-for-this-onenterframe-problem/285443 "2009-03-31T21:40:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![spyderfx](https://avatars.discourse-cdn.com/v4/letter/s/c2a13f/32.png) [@spyderfx](https://forum.kirupa.com/u/spyderfx)\
**Post date:** [March 31, 2009, 9:40pm UTC](https://forum.kirupa.com/t/any-quick-fix-for-this-onenterframe-problem/285443/1 "2009-03-31T21:40:00Z")

</div>

this function I am using with onEnterFrame only happens once. I’m not very good at actionscript and all the ways around this seemed like way more work than it should be. Can anyone help? Here is the code:

\_root.onEnterFrame = function(){  
if (Key.isDown(Key.ESCAPE)){  
checkDisplay();  
}  
}
