# How can i exit "onEnterFrame" of an MC?

**URL:** <https://forum.kirupa.com/t/how-can-i-exit-onenterframe-of-an-mc/133173>\
**Category:** Uncategorized\
**Created:** [January 6, 2005, 8:10am UTC](https://forum.kirupa.com/t/how-can-i-exit-onenterframe-of-an-mc/133173 "2005-01-06T08:10:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bodoi](https://avatars.discourse-cdn.com/v4/letter/b/34f0e0/32.png) [@Bodoi](https://forum.kirupa.com/u/Bodoi)\
**Post date:** [January 6, 2005, 8:10am UTC](https://forum.kirupa.com/t/how-can-i-exit-onenterframe-of-an-mc/133173/1 "2005-01-06T08:10:46Z")

</div>

I have code:

var i=0;  
this.onEnterFrame=function()  
{  
if (i\<4)  
{  
trace(i);  
i++;  
}  
}  
trace(i++);

Only that.  
But output window dont show 4. \>\_\<  
How can i exit that and continous next code??
