Close and open action


   I wrote this code that loads and unloads object to the screen. But have small issue. When i press the CityButton it loads the object... i dont want the villageButton or anything to be selectable until the CityButton is pressed again which causes the loaded city object to be removed.

look at the code below to understand more.

thank you

///this is the button events for each name/
cityButton.addEventListener(MouseEvent.CLICK, clickHandler);
villageButton.addEventListener(MouseEvent.CLICK, clickHandler2);

/this is the boolean that decides if all is true or false when obj loaded
also creat class of object
var isThere:Boolean = false;
var isThere2:Boolean = false;
var mcHandle:MovieClip = new dahelpbox();
var mcHandle2:MovieClip = new dahelpbox2();

//position the textbox eli
mcHandle.x = 100;
mcHandle.y = 100;
mcHandle2.x = 100;
mcHandle2.y = 100;

///this is the conditions to load or unload object depending if it
meets the required requirements to load.
function clickHandler(e:MouseEvent):void {
if (!isThere) {
isThere = !isThere;
} else {
isThere = !isThere;
function clickHandler2(e:MouseEvent):void {
if (!isThere2) {
isThere2 = !isThere2;
} else {
isThere2 = !isThere2;