How can i exit "onEnterFrame" of an MC?

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??