# Can anyone see the problem with my if/else code?

**URL:** https://forum.kirupa.com/t/can-anyone-see-the-problem-with-my-if-else-code/169984
**Category:** Uncategorized
**Created:** [November 21, 2005, 8:14pm UTC](https://forum.kirupa.com/t/can-anyone-see-the-problem-with-my-if-else-code/169984 "2005-11-21T20:14:10Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![tikwik](https://avatars.discourse-cdn.com/v4/letter/t/b487fb/32.png) [@tikwik](https://forum.kirupa.com/u/tikwik)
#### Post date: [November 21, 2005, 8:14pm UTC](https://forum.kirupa.com/t/can-anyone-see-the-problem-with-my-if-else-code/169984/1 "2005-11-21T20:14:10Z")

</div>

Any help would be appreciated! This is on a button. The first part works, but then when I press the button when the currentmovie is “section3”, nothing happens. is it not ok to write an if/else statement with two “elses”? The second “else” doesnt seem to work…?? :ninja:

on (release) {  
gotoAndStop(“end”);  
if (\_root.currMovie == undefined) {  
\_root.currMovie = “section4”;  
container.loadMovie(“section4.swf”);  
} else if (\_root.currMovie == “section2b”) {  
if (container.\_currentframe\>=container.midframe) {  
gotoAndStop(“profileplay”);  
\_root.currMovie = “section4”;  
container.play();  
} else if (\_root.currMovie == “section3”) {  
if (container.\_currentframe\>=container.midframe) {  
gotoAndStop(“portplay”);  
\_root.currMovie = “section4”;  
container.play();  
}  
}  
}  
}
