Warning 1090: Migration issue

March 27th, 2010 posted by The Hippy

Actionscript 3 errors and warnings are not always easy to understand – especially if you’re teaching yourself and aren’t completely up on all of the terminology. Sometimes I scream for the error message to be plainer English and spend far too long googling the solution. So from now on if I get an error and found that the solution was simple but took a while to find, I’m going to blog it here. Hopefully it will help somebody else too!

Warning: 1090: Migration issue: The onMouseDown event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0

This warning occurs if you try to use Actionscript 2 event handler names in your Actionscript 3 code, eg onMouseDown, onMouseOver, onRelease etc etc. Simply change the name and it will go away! Apparently it was added as a way of warning you not to mix up AS2 with AS3, but personally I find it a bit irritating as I used those names so that I would easily remember them (having coded in AS2 for quite a long time).

So as an example, if you’ve coded something like…

this.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
public function onMouseOver(e:MouseEvent)
{
trace("over");
}

…simply change it to something that wasn’t previously reserved in AS2, like…

this.addEventListener(MouseEvent.MOUSE_OVER, onBtnOver);
public function onBtnOver(e:MouseEvent)
{
trace("over");
}

One other thing about Warning 1090 – apparently it won’t appear if you don’t use the Flash IDE to compile. But if you’re like me and you code in FlashDevelop and compile in the IDE (because you like to mess around with detailed graphic designs), it will unfortunately continue to plague you. Fingers crossed they’ll ditch it in CS5.

Post to Twitter Post to Facebook Post to StumbleUpon Post to Digg