0

Below is the code I did for a basic button and menu interaction using flash tween and ease class for animation. Tested movie but no response and no compiler errors either except output panel says :

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

where Cloudrail is my document name.

Here is the code :

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();
    }
}`

please what could be wrong?

1 Answer 1

3

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

should be

switchbd_btn.addEventListener(MouseEvent.MOUSE_DOWN, ShowswitchBD);

Sign up to request clarification or add additional context in comments.

3 Comments

If you're wondering what the difference is, there is a superfluous period in the original code after addEventListener - this is the cause of the stated error.
Yes, for sure that line is not correct. Not sure if it's the cause of the problem, but as inverse mentioned, you may have a typo there.
Thanks, it's sorted. Quite interesting to note the level of headache one dot is capable of creating.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.