1
我该如何去循环这个,所以我不必复制和粘贴相同的代码高达10或更高?AS3循环按钮(添加监听器和功能)
optionsmenu.char01.addEventListener(MouseEvent.CLICK, gochar01);
function gochar1 (event:MouseEvent): void {
char.gotoAndStop(1);
}
optionsmenu.char02.addEventListener(MouseEvent.CLICK, gochar02);
function gochar2 (event:MouseEvent): void {
char.gotoAndStop(2);
}
这工作,太感谢你了! – user3123073