I've been having problems today getting MouseEvent.ROLL_OVER to work correctly today.
Here's my code:
package
{
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.geom.ColorTransform;
[SWF(width='640', height='640', backgroundColor="0x333333", frameRate='24')]
public class TestMouseEventProject extends Sprite
{
private var sprite:Sprite;
public function TestMouseEventProject()
{
this.sprite = new Sprite();
this.sprite.graphics.beginFill(0x00,1);
this.sprite.graphics.drawRect(0,0,30,30);
this.sprite.graphics.endFill();
this.sprite.addEventListener(MouseEvent.ROLL_OVER,onMouseOver);
this.addChild( this.sprite );
}
private function onMouseOver(event:MouseEvent):void
{
trace( this+": mouseOver" );
this.sprite.x += 2;
var ct:ColorTransform = new ColorTransform();
ct.color = 0xFF;
this.sprite.transform.colorTransform =
}
}
}
If I roll on the stage, it fires. If I roll off the stage it fires. Seems to be only firefox specific. Why is it firing when it shouldn't?
I'm running Mac 10.6.7 with Firefox 4.0.1. I've tried several things like running firefox in safe mode and change the wmode to "opaque". I've even tried css object{outline:none}. These are different things I've found in other blogs. Still keeps happening. Another strange thing is that stage.mouseX and stage.mouseY will usually be "5".
I found this:
http://www.soundstep.com/blog/2010/03/02/firefox-3-6-mac-bug-with-mouseevent/
Looks to be the same issue.