Skip to main content
June 15, 2012
Answered

Warning 1090 in AS3...?

  • June 15, 2012
  • 2 replies
  • 4357 views

I need help with this AS3 code...

shinyButton.onRollOver = function() {

          this.glitter.play();

};

I keep getting this error-

Warning: 1090: Migration issue: 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).

Please help ASAP.

Thanks.

This topic has been closed for replies.
Correct answer

where is glitter in relationship to shinyButton? inside of it? or outside of it? if it is inside, change your scoping:

shinyButton.addEventListener(MouseEvent.MOUSE_OVER,overMouse);

function overMouse(e:MouseEvent):void{

       e.target.glitter.play();

}

//---

and then brush up on your mouse events in as3 here:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/MouseEvent.html


All I did was change the doc to AS2 and my first code worked fine.

2 replies

Inspiring
June 15, 2012

the code you show is as2

brush up on your mouse events in as3 here:

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/events/MouseEvent.html

esdebon
Inspiring
June 15, 2012

your code is AS2

the correct code in AS3 is:

shinyButton.addEventListener(MouseEvent.MOUSE_OVER,overMouse);

function overMouse(e:MouseEvent):void{

       this.glitter.play();

}

June 15, 2012

Now it says that the term "overMouse()" is undefined.

esdebon
Inspiring
June 15, 2012

remove "()"

shinyButton.addEventListener(MouseEvent.MOUSE_OVER,overMouse);

function overMouse(e:MouseEvent):void{

       this.glitter.play();

}