# Movieclip control

**URL:** <https://forum.kirupa.com/t/movieclip-control/164729>\
**Category:** Uncategorized\
**Created:** [October 4, 2005, 12:32pm UTC](https://forum.kirupa.com/t/movieclip-control/164729 "2005-10-04T12:32:20Z")\
**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 4, 2005, 12:32pm UTC](https://forum.kirupa.com/t/movieclip-control/164729/1 "2005-10-04T12:32:20Z")

</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.

Thanks in advance.
