Skip to main content
Participant
February 21, 2015
Question

TypeError: Error #1034: Type Coercion failed: cannot convert flash.events::MouseEvent@7ff5f84220d1 to fl.motion.MotionEvent.

  • February 21, 2015
  • 1 reply
  • 2258 views

Using Action Script 3

gave me this error!

Help me!!!

import fl.motion.MotionEvent;

stop ();

function doutzen_clicked (e:MotionEvent) :void {

  gotoAndStop(1);

}

function doutzen2_clicked (e:MotionEvent) :void {

  gotoAndStop(2);

}

function doutzen3_clicked (e:MotionEvent) :void {

  gotoAndStop(3);

}

function doutzen4_clicked (e:MotionEvent) :void {

  gotoAndStop(4);

}

doutzen.addEventListener(MouseEvent.CLICK,doutzen_clicked) ;

doutzen2.addEventListener(MouseEvent.CLICK,doutzen2_clicked) ;

doutzen3.addEventListener(MouseEvent.CLICK,doutzen3_clicked) ;

doutzen4.addEventListener(MouseEvent.CLICK,doutzen4_clicked) ;

Help me!!!!

This topic has been closed for replies.

1 reply

Ned Murphy
Legend
February 21, 2015

The error clearly indicates what is wrong.  Everywhere in the code that you show where you have MotionEvent you should have MouseEvent instead.

Participant
February 22, 2015

Thank you, had not noticed it, thank you. Best regards.