On 11/13/2008 12:50 AM, Philip Romanik wrote:
Approved!
Is the timing of the onmouseover event important? Using the test in
LP-7300, the mouseover event in swf8 occurs when you let go of the
mouse. In swf9, the mouseover event happens immediately when the mouse
is dragged over the object.
I think this is an important issue.
And did you already try to use "MouseEvent#relatedObject" instead of
"getObjectsUnderPoint()"?
testcase:
---
<canvas debug="true">
<view name="V1" width="100" height="100" bgcolor="0xff0000">
<dragstate name="drag" applied="false"/>
<handler name="onmousedown">
this.drag.setAttribute('applied', true);
</handler>
<handler name="onmouseup">
this.drag.setAttribute('applied', false);
</handler>
</view>
<view x="110" name="V2" width="100" height="100" bgcolor="0x00ff00">
<handler name="onmouseover" >
Debug.write("Drag mouse over this view");
</handler>
<passthrough>
import flash.events.*;
</passthrough>
<handler name="oninit" >
*if ($swf9) {
this.f = function (e:MouseEvent) {
Debug.write((e.target.parent cast LzSprite).owner);
if (e.relatedObject) {
Debug.write((e.relatedObject.parent cast LzSprite).owner);
} else {
Debug.write("no related object")
}
}
this.sprite.clickbutton.addEventListener(MouseEvent.MOUSE_OVER,
this.f, false);
}*
</handler>
</view>
</canvas>
---
The behavior of docs/src/developers/programs/input-devices-$8.lzx is
not identical in swf8/swf9. In swf8, the box you are on when you
release the mouse increases in size. In swf9, it only does this if you
end your drag on the same box you initially clicked on.
Also, the LP-7300 app doesn't work in dhtml. Will the same type of fix
you made for swf9 work in dhtml?
Change 20081112-maxcarlson-t by [EMAIL PROTECTED]
<mailto:[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
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
Files:
M WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
Changeset:
http://svn.openlaszlo.org/openlaszlo/patches/20081112-maxcarlson-t.tar