# Help with if statements and variables

**URL:** <https://forum.kirupa.com/t/help-with-if-statements-and-variables/174354>\
**Category:** Uncategorized\
**Created:** [January 4, 2006, 11:32pm UTC](https://forum.kirupa.com/t/help-with-if-statements-and-variables/174354 "2006-01-04T23:32:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![handless](https://avatars.discourse-cdn.com/v4/letter/h/b4bc9f/32.png) [@handless](https://forum.kirupa.com/u/handless)\
**Post date:** [January 4, 2006, 11:32pm UTC](https://forum.kirupa.com/t/help-with-if-statements-and-variables/174354/1 "2006-01-04T23:32:30Z")

</div>

now i know this is prolly a very simple thing to do, but i havent used flash in a really long time and im tring to get into it, but dont remember anything for the most part. basicly what i am tring to do is make it so that when you click on a menu option at the top which is in its own movie clip, it will check a variable i have stored on the main movie and using if else statements play a certain part of a different movie clip. on the main clip i have the variable stored as

\_global.titlebar = “main”;

and then on the button i have

on(release){  
if (titlebar = “main”){  
\_root.menuobject.gotoAndPlay(2);  
\_global.titlebar = “profile”;  
}  
}

am i even close to what i need to do. i have all the instance names correct and have checked that many of times.
