3 Replies Latest reply on May 6, 2007 12:20 AM by stwingy

    Warning: 1090: Migration issue

    tmcquage
      For me, I am still crying, there are more surprises with AS3. I have a hitTest, a bee rolls over a flower and a guitar sounds plays.

      So, here's the code (the two Movies are 'ins_aG' and 'ins_bee'):

      this.ins_aG.onRollOver = function() {
      var is_hit = this.ins_aG.hitTest(this.ins_bee);
      if (is_hit == true) {
      with (this.ins_aG) {
      gotoAndPlay("aChord");
      }
      } else {
      //do nothing
      }

      When I publish this, it compiles the following warning:

      The onRollOver event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( 'mouseOver', callback_handler).

      Anyone know what I should be doing to register the handler, how would the code look?
        • 1. Re: Warning: 1090: Migration issue
          stwingy
          something like
          ins_aG.addEventListener(MouseEvent.ROLL_OVER, rOver);
          ins_aG.addEventListener(MouseEvent.ROLL_OUT, rOut);
          function rOver(e:MouseEvent):void {
          trace(e.target.name);
          }
          function rOut(e:MouseEvent):void {
          trace(e.target.name);
          }
          • 2. Re: Warning: 1090: Migration issue
            tmcquage Level 1
            That works great for the MouseEvent, but when I use a startDrag to control a MovieClip as the mouse, it does not seem to work--there are no errors, I don't know if I am looking for a MouseEvent, I am struggling to get the AS2 hitTest syntax to work with AS3, basically, I have the mouse acting like bee that you can rollover flowers to hear music.

            import flash.events.MouseEvent;
            Mouse.hide();
            stage.addEventListener(MouseEvent.MOUSE_MOVE,moveBee);
            var rect:Rectangle=new Rectangle(46,31,686,560);
            function moveBee(e:MouseEvent):void {
            this.ins_bee.startDrag(true, rect);
            }

            this.ins_aG.addEventListener(MouseEvent.ROLL_OVER, rOver);
            this.ins_aG.addEventListener(MouseEvent.ROLL_OUT, rOut);
            function rOver(e:MouseEvent):void {
            with (this.ins_aG) {
            gotoAndPlay("aChord");
            }
            }
            function rOut(e:MouseEvent):void {
            // do nothing
            }
            • 3. Re: Warning: 1090: Migration issue
              stwingy Level 1
              I thought the use of startDrag() a little strange and you may still be better changing to my suggestion in your other post(just with conditions to limit the area of movement).
              However, instead of using MouseEvents why not just set up something like this