Actionscript AS2:错误预期为';(';当使用后缀括号时)

Actionscript AS2:错误预期为';(';当使用后缀括号时),actionscript,syntax-error,actionscript-2,Actionscript,Syntax Error,Actionscript 2,我想根据用户是否按up键来设置帧 在一个对象上,我编写了以下代码: onClipEvent(enterFrame){ if ((x == 0) && (keyPress "<Up>")){ gotoAndPlay(y); x = 1; } } onClipEvent(enterFrame){ 如果((x==0)和(&(按键“”){ gotoAndPlay(y); x=1; } } 我得到这个错误: 场景=场景1,层=

我想根据用户是否按up键来设置帧

在一个对象上,我编写了以下代码:

onClipEvent(enterFrame){
    if ((x == 0) && (keyPress "<Up>")){
        gotoAndPlay(y);
        x = 1;
    }
}
onClipEvent(enterFrame){
如果((x==0)和(&(按键“”){
gotoAndPlay(y);
x=1;
}
}
我得到这个错误:

场景=场景1,层=层18,帧=51,第2行',预期为'


哪个是那个框架。

请格式化您的代码您的问题在这里:
(按键“”)
。你没有接线员