# Moviclip control (if statements)

**URL:** <https://forum.kirupa.com/t/moviclip-control-if-statements/164670>\
**Category:** Uncategorized\
**Created:** [October 3, 2005, 11:02pm UTC](https://forum.kirupa.com/t/moviclip-control-if-statements/164670 "2005-10-03T23:02:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sansimian](https://avatars.discourse-cdn.com/v4/letter/s/8dc957/32.png) [@sansimian](https://forum.kirupa.com/u/sansimian)\
**Post date:** [October 3, 2005, 11:02pm UTC](https://forum.kirupa.com/t/moviclip-control-if-statements/164670/1 "2005-10-03T23:02:30Z")

</div>

Hey guys,

So basically I’m building a site. When you click one of the menu items it  
loads the page using the ‘with’ command.

Example:

About button

with(\_root.about){  
play();  
}

So when you click a button it makes the movieclip play,  
then when you click the button again or the close button  
the movieclip plays again and it dissapears.

What I am looking for is when you click a different button  
if on of the other pages is open it closes then the new one opens  
so you dont get the overlapping pages.

I think I need if else statements but have no idea of how to go about it.

My fla file is attached.

Thanks in advance.
