Actionscript代码未执行但没有编译器错误

时间:2015-12-14 22:59:45

标签: actionscript-3 flash

下面是我使用Flash补间和easy类动画进行基本按钮和菜单交互的代码。除了输出面板之外,测试的电影但没有响应,也没有编译器错误:

TypeError: Error #1123: Filter operator not supported on type builtin.as$0.MethodClosure.
    at CloudRail_fla::LaunchDeckcontrols_3/frame1()

其中Cloudrail是我的文档名称。

以下是代码:

switchbd_btn.addEventListener.(MouseEvent.MOUSE_DOWN, ShowswitchBD);

var switchbdIN:Tween = new Tween (switchbd, "x", Strong.easeOut, 1089.05, 277.85, 1, true);
var switchbdOUT:Tween = new Tween (switchbd, "x", Strong.easeOut, 277.85, 1089.05, 1, true);

function ShowswitchBD(e:MouseEvent):void {
    if (switchbd.currentFrame == 1)
    {
        gotoAndStop(2);
        switchbdIN.start();
}
    else {
        gotoAndStop(1);
        switchbdOUT.start();
    }
}`

请问可能出错?

1 个答案:

答案 0 :(得分:3)

switchbd_btn.addEventListener.(MouseEvent.MOUSE_DOWN, ShowswitchBD);

应该是

switchbd_btn.addEventListener(MouseEvent.MOUSE_DOWN, ShowswitchBD);