[Laszlo-dev] For Review: Change 20090311-hqm-G Summary: make swf9 mouse events on text match swf8 behavior

André Bargull andre.bargull at udo.edu
Thu Mar 12 10:51:15 PDT 2009


The change breaks the weather-demo in swf9, you cannot click any more on 
the "OK"-button. The mouse-event is not dispatched on the bitmap-asset.

And some new tests:
- the onclick-handler doesn't work for the left view
- onmouseover/out doesn't work properly for the right view

(The clickable sprite isn't included in the 
LFCApplication.stage.getObjectsUnderPoint array, therefore I've changed 
LzSprite#isBkgndRequired to force the sprite to have the required size.)
---
<canvas debug="true">
     <view>
         <view width="100" height="100" onclick="Debug.write('clicked')" />
         <view width="100" height="100" bgcolor="red" />
         <text text="click on me!" />
     </view>
     <view x="150">
         <view width="100" height="100" 
onmouseover="Debug.write('onmouseover')" 
onmouseout="Debug.write('onmouseout')"/>
         <view width="100" height="100" bgcolor="red" />
         <text text="mouse over!" />
     </view>
</canvas>
---

I've attached updated versions of LzSprite and LzTextSprite (still 
contains debug code). All tests are working so far with that files, but 
I bet there are more issues.


On 3/12/2009 2:48 PM, Henry Minsky wrote:
> Change 20090311-hqm-G by hqm at badtzmaru.home on 2009-03-11 22:55:39 EDT
>     in /Users/hqm/openlaszlo/trunk6
>     for http://svn.openlaszlo.org/openlaszlo/trunk
> 
> Summary: make swf9 mouse events on text match swf8 behavior
> 
> New Features:
> 
> Bugs Fixed: LPP-7551
> 
> Technical Reviewer: andre
> QA Reviewer: max
> Doc Reviewer: (pending)
> 
> Documentation:
> 
> Release Notes:
> 
> Details:
> 
> + Always set mouseEnabled=true on text sprite's textfield object, to
> allow Flash TextEvent.LINK hyperlink events to work.
> 
> + For LzInputTextSprite also, leave mouseEnabled=true
> 
> + Mouse event handling attempts to match swf8 behavior. Events are 
> caught and forwarded
> to the next mouseEnabled view, via the getObjectsUnderPoint method.
> 
> + To match behavior of swf8 (LPP-6859), selectable text or input text
> is set consume mouse events (setCancelBubbling) and not forward them to 
> other views.
> 
> 
> Tests:
> 
> + see attached test case, lpp-7551.txt
>   behavior should be same as swf8
> 
>  * except there is one difference in swf8 and swf9 behavior:
>    When clicking on a hyperlink (click on a link in the
>    left hand text field) an "onclick" in swf9
>    is also transmitted to the view behind the text. I don't know of a 
> good workaround for this.
> 
> Files:
> M      WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
> M      WEB-INF/lps/lfc/kernel/swf9/LzInputTextSprite.as
> M      WEB-INF/lps/lfc/views/LzText.lzs
> 
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090311-hqm-G.tar
> 
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: LzSprite.as
Url: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20090312/b10f902a/LzSprite-0001.pl
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: LzTextSprite.as
Url: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20090312/b10f902a/LzTextSprite-0001.pl


More information about the Laszlo-dev mailing list