Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Warning 1090 in AS3...?

Guest
Jun 15, 2012 Jun 15, 2012

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.

TOPICS
ActionScript
4.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Deleted User
Jun 18, 2012 Jun 18, 2012

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

Translate
Enthusiast ,
Jun 15, 2012 Jun 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();

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 15, 2012 Jun 15, 2012

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 15, 2012 Jun 15, 2012

remove "()"

shinyButton.addEventListener(MouseEvent.MOUSE_OVER,overMouse);

function overMouse(e:MouseEvent):void{

       this.glitter.play();

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 15, 2012 Jun 15, 2012

Thats exactly what i have

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jun 15, 2012 Jun 15, 2012

you have overMouse() and need overMouse

shinyButton.addEventListener(MouseEvent.MOUSE_OVER,overMouse());   

shinyButton.addEventListener(MouseEvent.MOUSE_OVER,overMouse);      

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 15, 2012 Jun 15, 2012

This is what I have...

shinyButton.addEventListener(MouseEvent.MOUSE_OVER,overMouse);

function overMouse(e:MouseEvent):void{

       this.glitter.play();

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 15, 2012 Jun 15, 2012

and it says that the...

overMouse

...is wrong

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 15, 2012 Jun 15, 2012

*is undefined

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 17, 2012 Jun 17, 2012

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 18, 2012 Jun 18, 2012
LATEST

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 15, 2012 Jun 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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines