# Problem with if statements

**URL:** <https://forum.kirupa.com/t/problem-with-if-statements/227017>\
**Category:** flash\
**Created:** [May 25, 2007, 9:31pm UTC](https://forum.kirupa.com/t/problem-with-if-statements/227017 "2007-05-25T21:31:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![topaulbrown](https://avatars.discourse-cdn.com/v4/letter/t/df788c/32.png) [@topaulbrown](https://forum.kirupa.com/u/topaulbrown)\
**Post date:** [May 25, 2007, 9:31pm UTC](https://forum.kirupa.com/t/problem-with-if-statements/227017/1 "2007-05-25T21:31:57Z")

</div>

Hey Guys,

Sorry, I’ve been looking at tutorials and forums for the last couple of days now to sort this out and think I’m confusing myself more and more!

I have a movieclip in my main timeline as a menu. I want to go to a different scene in the main swf file depending on what scene I am in.

Right now I’m using an if statement on the button within the menu(see below) but when I click on the button it only plays the first line of the if statement. Can anyone help please?

on (rollOver, dragOver) {  
gotoAndPlay(“s1”);  
}  
on (rollOut, dragOut) {  
gotoAndPlay(“s2”);  
}  
on (release) {  
if (\_root.\_currentframe == “info”) {  
}  
\_root.gotoAndPlay(“infoimages”);  
if (\_root.\_currentframe == “cuttings”) {  
}  
\_root.gotoAndPlay(“cuttingsimages”);  
if (\_root.\_currentframe == “contact”) {  
}  
\_root.gotoAndPlay(“contactimages”);

Thanks  
P  
:h:
