# Event.ENTER\_FRAME skipped to the end

**URL:** <https://forum.kirupa.com/t/event-enter-frame-skipped-to-the-end/286418>\
**Category:** flash\
**Created:** [April 15, 2009, 9:15am UTC](https://forum.kirupa.com/t/event-enter-frame-skipped-to-the-end/286418 "2009-04-15T09:15:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![darnpunk](https://avatars.discourse-cdn.com/v4/letter/d/ad7895/32.png) [@darnpunk](https://forum.kirupa.com/u/darnpunk)\
**Post date:** [April 15, 2009, 9:15am UTC](https://forum.kirupa.com/t/event-enter-frame-skipped-to-the-end/286418/1 "2009-04-15T09:15:17Z")

</div>

Hi all,

I am facing a problem where I have a listener listening to Event.ENTER\_FRAME:

```auto
public function showAnimation():void {
    
    var character:MovieClip = new Character();
    
    character.setAnimation("jump");
    character.addEventListener(Event.ENTER_FRAME, onJump);
}
        
public function onJump(e:Event):void {
            
    var character:MovieClip = e.currentTarget as MovieClip;
    var currentFrame:uint = character.currentFrame;
    var totalFrames:uint = character.totalFrames; // total is 10
    
    trace("currentFrame: " + currentFrame);

    if (currentFrame >= totalFrames) {
        
        character.stop();
        character.removeEventListener(Event.ENTER_FRAME, onJump);
        character.stand();
        
    }
}

```

Usually, the normal tracing for currentFrame should be “1, 2, 3, 4…10” but for my case, I get it as “1, 10”. It skips the rest of the frames. Anyone experienced this before?

Is there a better way to check if a movie clip reached its last frame other than checking its currentFrame or currentLabel (putting a label “end” to check for)?
