# MX-onEnterFrame

**URL:** <https://forum.kirupa.com/t/mx-onenterframe/27786>\
**Category:** flash\
**Created:** [August 6, 2003, 4:38pm UTC](https://forum.kirupa.com/t/mx-onenterframe/27786 "2003-08-06T16:38:41Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![grandsp5](https://avatars.discourse-cdn.com/v4/letter/g/6bbea6/32.png) [@grandsp5](https://forum.kirupa.com/u/grandsp5)\
**Post date:** [August 6, 2003, 4:38pm UTC](https://forum.kirupa.com/t/mx-onenterframe/27786/1 "2003-08-06T16:38:41Z")

</div>

Ok I have been working with the onEnterFrame handler for a while but I still dont have a good grasp of what it does. Does it execute whatever code is written between the brackets every time the movie enters a new frame? Or does it just keep executing the code constantly. And how do I clear the code I wrote inside these brackets so it wont execute later?  
It is just delete this.onEnterFrame ? A brief explanation of what it is and how it works would be greatly appreciated. I didnt get much from the help file.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 6, 2003, 4:41pm UTC](https://forum.kirupa.com/t/mx-onenterframe/27786/2 "2003-08-06T16:41:34Z")

</div>

yyaah, you’re pretty much right (from what i know :))…

and yea its just delete this.onEnterFrame. It just stops everythings in the brackets for the onenterframe thing 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 6, 2003, 4:45pm UTC](https://forum.kirupa.com/t/mx-onenterframe/27786/3 "2003-08-06T16:45:07Z")

</div>

If enter frame only executes while the timeline is moving, how come this file still works?

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 6, 2003, 4:46pm UTC](https://forum.kirupa.com/t/mx-onenterframe/27786/4 "2003-08-06T16:46:11Z")

</div>

This file. It has a stop action but the onEnterFrame handler still works.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 6, 2003, 4:47pm UTC](https://forum.kirupa.com/t/mx-onenterframe/27786/5 "2003-08-06T16:47:25Z")

</div>

Everything inside the event handler will run at the speed of FPS, thats frames per second of the movie.

Regards,  
Viru.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 6, 2003, 4:50pm UTC](https://forum.kirupa.com/t/mx-onenterframe/27786/6 "2003-08-06T16:50:52Z")

</div>

Ok so the event handler runs independent of the timeline. So its sorta like a movie clip in that it does its on thing at 12fps or whatever
