我对 as3 很陌生,所以这对你们中的大多数人来说可能很明显:P 我正在使用 numPressed 函数(它计算鼠标点击次数)并且需要在第 6 次点击后重置鼠标点击......这个是代码的样子:
var numPressed:Number = 0;
any_mc.addEventListener(MouseEvent.CLICK, countUp);
function countUp(evt:MouseEvent):void {
numPressed++;
if (numPressed == 1) {
any_mc.gotoAndPlay(1);
}
else if (numPressed == 2) {
any_mc.gotoAndPlay(2);
}
else if (numPressed == 3) {
any_mc.gotoAndPlay(3);
}
else if (numPressed == 4) {
any_mc.gotoAndPlay(4);
}
else if (numPressed == 5) {
any_mc.gotoAndPlay(5);
}
}
任何帮助将非常感激!