# Is this valid code? (if, else if...)

**URL:** <https://forum.kirupa.com/t/is-this-valid-code-if-else-if/223526>\
**Category:** Uncategorized\
**Created:** [April 23, 2007, 4:21pm UTC](https://forum.kirupa.com/t/is-this-valid-code-if-else-if/223526 "2007-04-23T16:21:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dalewb](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/dalewb/32/3029_2.png) [@dalewb](https://forum.kirupa.com/u/dalewb)\
**Post date:** [April 23, 2007, 4:21pm UTC](https://forum.kirupa.com/t/is-this-valid-code-if-else-if/223526/1 "2007-04-23T16:21:47Z")

</div>

This code doesn’t seem to be working and I am wondering if I am using the if… else if… logic incorrectly:

```auto

onEnterFrame = function():Void{
    if(this._currentframe > 1946){
        _parent.slideTo(slideX[3], slideY[3], 1, "easeInOutQuart");
    }
    if(this._currentframe < 1946){
        _parent.slideTo(slideX[2], slideY[2], 1, "easeInOutQuart");
    }
    else if(this._currentframe > 1295){
        _parent._parent.footerMC.dialoguePanel(125, -300, 300, 300, "text/tx3-4.txt");
    }
    else if(this._currentframe > 940){
        _parent._parent.footerMC.dialoguePanel(125, -140, 350, 125, "text/tx3-3.txt");
    }
    else if(this._currentframe > 434){
        _parent._parent.footerMC.dialoguePanel(125, -175, 375, 150, "text/tx3-2.txt");
    }
}

```

This code is meant to assist the fast-forward and reverse buttons catch actions that occur on the timeline as they travel along skipping 15 frames at a time, but the actions are not being caught for some reason.  
If someone would point out what I am doing wrong…
