# Syntax error with else if statement

**URL:** https://forum.kirupa.com/t/syntax-error-with-else-if-statement/243422
**Category:** flash
**Created:** [November 6, 2007, 9:38pm UTC](https://forum.kirupa.com/t/syntax-error-with-else-if-statement/243422 "2007-11-06T21:38:45Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![olivestreetprod](https://avatars.discourse-cdn.com/v4/letter/o/c6cbf5/32.png) [@olivestreetprod](https://forum.kirupa.com/u/olivestreetprod)
#### Post date: [November 6, 2007, 9:38pm UTC](https://forum.kirupa.com/t/syntax-error-with-else-if-statement/243422/1 "2007-11-06T21:38:45Z")

</div>

Here is my code:

// Play/Pause Toggle  
playPause.onRollOver = function() {  
if(this.\_currentframe == 1) this.gotoAndStop(“pauseOver”);

```
else if(this._currentframe== 20) this.gotoAndStop("playOver")

```

}

playPause.onRollOut = playPause.onReleaseOutside = function() {  
if(this.\_currentframe == 10) this.gotoAndStop(“pause”);

```
else if(this._currentframe== 30) this.gotoAndStop("play")

```

}

[COLOR=Red]playPause.onRelease = function() {  
if(this.\_currentframe == 10)  
this.gotoAndStop(“play”)  
this.\_parent.pauseit();  
[COLOR=Lime]} else if (this.\_currentframe == 20) {[/COLOR]  
this.gotoAndStop(“pause”)  
this.\_parent.unPauseit();  
}

[COLOR=Black]I don’t understand what’s wrong with the code in red. When I check it, it says I have a syntax error on line 74, which is what I’ve highlighted in green.

Please, any help would be greatly appreciated.

Thanks,  
bfg  
[/COLOR][/COLOR]
