Copy link to clipboard
Copied
Hi guys,
Is it feature, when you finish drag operation of child element, Roll OVER/OUT will be re-dispatched to parent element?
Reproduce:
Environment:
Flash Player: 17.0.0.134, same reproducible in Chrome: 19.0.0.226
OS X El Capitan, Version 10.11.1
Example Code:
package {
import flash.display.Sprite;
import flash.events.MouseEvent;
import flash.geom.Rectangle;
public class Main extends Sprite {
private var _drag:Sprite;
public function Main() {
var sensor:Sprite = new Sprite();
_drag = new Sprite();
sensor.addEventListener(MouseEvent.ROLL_OUT, mouseOut);
sensor.addEventListener(MouseEvent.ROLL_OVER, mouseOver);
sensor.addEventListener(MouseEvent.MOUSE_DOWN, mouseDown);
addChild(sensor);
sensor.addChild(_drag);
sensor.x = sensor.y = 100;
sensor.graphics.beginFill(0x009900);
sensor.graphics.drawRect(0, 0, 100, 100);
_drag.graphics.beginFill(0x990099);
_drag.graphics.drawCircle(0, 0, 5);
_drag.x = _drag.y = 10;
}
private function mouseDown(e:MouseEvent):void {
_drag.startDrag(true, new Rectangle(10, 10, 50, 0));
stage.addEventListener(MouseEvent.MOUSE_UP, mouseUp);
}
private function mouseOver(e:MouseEvent):void {
trace('over');
}
private function mouseOut(e:MouseEvent):void {
trace('out');
}
private function mouseUp(e:MouseEvent):void {
_drag.stopDrag();
}
}
}
Copy link to clipboard
Copied
You added the over and out listeners to the rectangle, so you *should* get events when the mouse enters or leaves the rectangle regardless of whether you did the drag or not (which is what I'm seeing on both my El Capitan and Windows boxes).
The scenario where you drag out and release does appear to dispatch an extraneous event on MacOS 10.11.1. It does *not* do this on Win7. I don't have an older MacOS handy to try. My guess is that we need to make an adjustment for a change in the OS. This is also happening in the standalone debugger in Flash Pro (on mac only), so it's not browser-specific.
I'll follow up with a bug number in a few.
Copy link to clipboard
Copied
I filed bug 4088503 on your behalf, over at bugbase.adobe.com.