你说你的代码是:
gobtn.addEventListener(MouseEvent.CLICK,fun2);
function fun2(evt:Event):void {
if(chap1.selected==true) gotoAndStop(3);
if(chap2.selected==true) gotoAndStop(14);
}
backbtn.addEventListener(MouseEvent.CLICK,fun3);
function fun3(evt1:Event):void { gotoAndStop(1); }
为了使您的复选框按您的意愿工作(因此,如果chap1
选中,则转到第 3 帧,无论是否chap2
选中,else
在您的第一个if
.
gobtn.addEventListener(MouseEvent.CLICK,fun2);
function fun2(evt:Event):void {
if(chap1.selected==true) gotoAndStop(3);
else // this is what's added
if(chap2.selected==true) gotoAndStop(14);
}
backbtn.addEventListener(MouseEvent.CLICK,fun3);
function fun3(evt1:Event):void { gotoAndStop(1); }