I need help ending a piece only when all the buttons are clicked. Here’s the code I have.Also I’m new to this, a laymen explanation would be much appreciated. I want to actually learn how this is done.
stop ();
nature.addEventListener(MouseEvent.CLICK, buttonClick);
function buttonClick(event:MouseEvent):void{
gotoAndPlay("label 1");
}
scientific.addEventListener(MouseEvent.CLICK, buttonClick2);
function buttonClick2(event:MouseEvent):void{
gotoAndPlay("label 2");
}
freelance.addEventListener(MouseEvent.CLICK, buttonClick3);
function buttonClick3(event:MouseEvent):void{
gotoAndPlay("label 3");
}
commercial.addEventListener(MouseEvent.CLICK, buttonClick4);
function buttonClick4(event:MouseEvent):void{
gotoAndPlay("label 4");
}
art.addEventListener(MouseEvent.CLICK, buttonClick5);
function buttonClick5(event:MouseEvent):void{
gotoAndPlay("label 5");
}
travel.addEventListener(MouseEvent.CLICK, buttonClick6);
function buttonClick6(event:MouseEvent):void{
gotoAndPlay("label 6");
}
graphic.addEventListener(MouseEvent.CLICK, buttonClick7);
function buttonClick7(event:MouseEvent):void{
gotoAndPlay("label 7");
}
law.addEventListener(MouseEvent.CLICK, buttonClick8);
function buttonClick8(event:MouseEvent):void{
gotoAndPlay("label 8");
}
publish.addEventListener(MouseEvent.CLICK, buttonClick9);
function buttonClick9(event:MouseEvent):void{
gotoAndPlay("label 9");
}