Actionscript 3 AS3语法编译错误-应在rightparen前面加分号
我知道这是非常基本的,但是下面的函数在编译时生成了2个语法错误,如下所示。我想不出来。非常感谢您的帮助Actionscript 3 AS3语法编译错误-应在rightparen前面加分号,actionscript-3,flash,multi-touch,flash-cs6,Actionscript 3,Flash,Multi Touch,Flash Cs6,我知道这是非常基本的,但是下面的函数在编译时生成了2个语法错误,如下所示。我想不出来。非常感谢您的帮助 Game, Layer 'Actions', Frame 2, Line 5 1086: Syntax error: expecting semicolon before rightparen. Game, Layer 'Actions', Frame 2, Line 5 1084: Syntax error: expecting rightbrace before semicolon.
Game, Layer 'Actions', Frame 2, Line 5 1086: Syntax error: expecting semicolon before rightparen.
Game, Layer 'Actions', Frame 2, Line 5 1084: Syntax error: expecting rightbrace before semicolon.
function fl_TouchEndHandler_2(event:TouchEvent):void {
// Drag & drop stuff...
contained[i] = Gem1_MC.hitTestObject(Gem4_MC));
contained[i] = Gem2_MC.hitTestObject(Gem4_MC));
contained[i] = Gem3_MC.hitTestObject(Gem4_MC));
if (contained.indexOf(false) == -1) { // This returns -1 if it can't find false
gotoAndStop(1);
}
}
你有额外的“)”
尝试:
@用户1051467如果此答案解决了您的问题,请单击复选标记将其选择为已接受
function fl_TouchEndHandler_2(event:TouchEvent):void {
// Drag & drop stuff...
contained[i] = Gem1_MC.hitTestObject(Gem4_MC);
contained[i] = Gem2_MC.hitTestObject(Gem4_MC);
contained[i] = Gem3_MC.hitTestObject(Gem4_MC);
if (contained.indexOf(false) == -1) { // This returns -1 if it can't find false
gotoAndStop(1);
}
}