# Little problem

**URL:** <https://forum.kirupa.com/t/little-problem/283018>\
**Category:** Uncategorized\
**Created:** [March 1, 2009, 2:53pm UTC](https://forum.kirupa.com/t/little-problem/283018 "2009-03-01T14:53:39Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ivanoo](https://avatars.discourse-cdn.com/v4/letter/i/3ec8ea/32.png) [@ivanoo](https://forum.kirupa.com/u/ivanoo)\
**Post date:** [March 1, 2009, 2:53pm UTC](https://forum.kirupa.com/t/little-problem/283018/1 "2009-03-01T14:53:39Z")

</div>

i have 6 buttons  
every button linked to different movieclip … when i click on button 1 movieclip load correctly, but the problem is, when i click on button 1 again, movieclip load again …

the question is: i want when i click on button 1, i can’t click on it again, until i click on another button…

sorry but i had another question: i created my buttons animations with “labels” first label is “over” for roll over and second is “out” for roll out, labels “over” and “out” is working well, but the problem is, when i click on the button, it stop in frame (20), but when i roll the mouse out the button, it goes to play “out” label which is roll out, i think i need to use “if” condition… tell me what to do, and i will be thanks

here is my codes

> 

home\_mc.buttonMode = true;  
works\_mc.buttonMode = true;  
news\_mc.buttonMode = true;  
services\_mc.buttonMode = true;  
aboutus\_mc.buttonMode = true;  
contact\_mc.buttonMode = true;

var currentPage:MovieClip = home\_mc;

var ContactPage:pageContact = new pageContact();  
var ServicesPage:pageServices = new pageServices();

ContactPage.x = ServicesPage.x = -746.7;  
ContactPage.y = ServicesPage.y = -35.5;

home\_mc.TargetMC = homepage\_mc;  
contact\_mc.TargetMC = ContactPage;  
services\_mc.TargetMC = ServicesPage;

home\_mc.addEventListener(MouseEvent.ROLL\_OVER, OnOver);  
works\_mc.addEventListener(MouseEvent.ROLL\_OVER, OnOver);  
news\_mc.addEventListener(MouseEvent.ROLL\_OVER, OnOver);  
services\_mc.addEventListener(MouseEvent.ROLL\_OVER, OnOver);  
aboutus\_mc.addEventListener(MouseEvent.ROLL\_OVER, OnOver);  
contact\_mc.addEventListener(MouseEvent.ROLL\_OVER, OnOver);  
function OnOver(e:MouseEvent):void  
{  
e.currentTarget.gotoAndPlay(“over”);  
}  
home\_mc.addEventListener(MouseEvent.ROLL\_OUT, OnOut);  
works\_mc.addEventListener(MouseEvent.ROLL\_OUT, OnOut);  
news\_mc.addEventListener(MouseEvent.ROLL\_OUT, OnOut);  
services\_mc.addEventListener(MouseEvent.ROLL\_OUT, OnOut);  
aboutus\_mc.addEventListener(MouseEvent.ROLL\_OUT, OnOut);  
contact\_mc.addEventListener(MouseEvent.ROLL\_OUT, OnOut);  
function OnOut(e:MouseEvent):void  
{  
e.currentTarget.gotoAndPlay(“out”);  
}  
home\_mc.addEventListener(MouseEvent.CLICK, newPage);  
contact\_mc.addEventListener(MouseEvent.CLICK, newPage);  
news\_mc.addEventListener(MouseEvent.CLICK, newPage);  
works\_mc.addEventListener(MouseEvent.CLICK, newPage);  
services\_mc.addEventListener(MouseEvent.CLICK, newPage);  
aboutus\_mc.addEventListener(MouseEvent.CLICK, newPage);  
function newPage(e:MouseEvent):void  
{  
e.currentTarget.gotoAndStop(20);  
currentPage.TargetMC.gotoAndPlay(“out”);  
currentPage = MovieClip(e.currentTarget);  
addChild(currentPage.TargetMC);  
currentPage.TargetMC.gotoAndPlay(1);  
}
