[Laszlo-checkins] r11751 - openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9
max@openlaszlo.org
max at openlaszlo.org
Thu Nov 13 07:29:36 PST 2008
Author: max
Date: 2008-11-13 07:29:35 -0800 (Thu, 13 Nov 2008)
New Revision: 11751
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
Log:
Change 20081112-maxcarlson-t by maxcarlson at Bank.local on 2008-11-12 14:42:20 PST
in /Users/maxcarlson/openlaszlo/trunk-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Send mouseover/out events for views on top of the view the mouse went down on
Bugs Fixed: LPP-7300 - SWF9: some mouse events changed behavior
Technical Reviewer: promanik
QA Reviewer: andre.bargull at udo.edu
Details: Check the z-order of all sprites under the mouse, to make onmouseover/out consistent between swf8 and swf9.
Tests: Testcase from LPP-7300 and http://localhost:8080/trunk-clean/docs/src/developers/programs/input-devices-$8.lzx run consistently between swf8 and swf9
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as 2008-11-13 13:41:11 UTC (rev 11750)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf9/LzSprite.as 2008-11-13 15:29:35 UTC (rev 11751)
@@ -674,9 +674,27 @@
// send dragin/out events if the mouse is currently down
if (LzMouseKernel.__lastMouseDown &&
(eventname == 'onmouseover' || eventname == 'onmouseout')) {
- // only send mouseover/out if the mouse went down on this sprite
+ // only send mouseover/out if the mouse went down on this sprite - see LPP-6677
if (LzMouseKernel.__lastMouseDown == this) {
LzMouseKernel.__sendEvent(this.owner, eventname);
+ } else {
+ // check to see if this sprite is in front of the sprite the mouse went down on. See LPP-7300
+
+ var target:* = e.target;
+ var location:Point = new Point(target.mouseX, target.mouseY);
+ location = target.localToGlobal(location);
+ var sprites:Array = LFCApplication.stage.getObjectsUnderPoint(location);
+ var sawself = false;
+ for (var i = sprites.length; i >=0; i--) {
+ if (sprites[i] == this) {
+ sawself = true;
+ } else if (sawself && sprites[i] == LzMouseKernel.__lastMouseDown) {
+ // already saw ourselves, and we're on top of __lastMouseDown
+ LzMouseKernel.__sendEvent(this.owner, eventname);
+ break;
+
+ }
+ }
}
var dragname = eventname == 'onmouseover' ? 'onmousedragin' : 'onmousedragout';
More information about the Laszlo-checkins
mailing list