AS3 1084 Syntax Error

Out of context: Reply #3

  • Started
  • Last post
  • 9 Responses
  • CyBrain0

    Yikes, next problem.

    Here's the newly corrected code (only put in the : instead of . as described above)

    package {
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    import caurina.transitions.*;
    import caurina.transitions.properties.C...
    ColorShortcuts.init();
    public class mainBtn extends MovieClip {
    public var theDuration:Number = 2.0;
    public function mainBtn() {
    trace("hi");
    this.addEventListener(MouseEvent... mainRollOver);
    this.addEventListener(MouseEvent... mainRollOut);
    this.addEventListener(MouseEvent... mainClick);
    }
    private function mainRollOver(event:MouseEvent):v... {
    Tweener.addTween(this, {_color:0xFFF200, time:theDuration, transition:"easeOutQuart"});
    }
    private function mainRollOut(event:MouseEvent):vo... {
    Tweener.addTween(this, {_color:0xFFFFFF, time:theDuration, transition:"easeInQuart"});
    }
    private function mainClick(event:MouseEvent):void {
    trace("mainBtn click");
    }
    }
    }

    Now I get the error:
    "1046 Type was not found or was not a compile time constant"

    There isn't one mention of textField in that whole .as file. What gives?

View thread