[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 11:09:48 PDT 2009


Sure, it requires much work to get mouse-events working the same in all 
runtimes. For example, six changesets and excessive testing were needed 
for LPP-7300/LPP-7335. But I haven't given up yet! ;-)


On 3/12/2009 6:54 PM, Henry Minsky wrote:
> Yeah, this is kind of a high risk change, because there are so many
> mouse event behaviors
> that we have to preserve.
> 
> 
> The only alternative I can think of to allow people to use the swf9
> hyperlinks mechanism would be to let them explicitly set mouseEnabled
> on a particular LzText view, with the understanding that it would
> break some of the other mouse events.
> 
> 
> 
> On Thu, Mar 12, 2009 at 1:51 PM, André Bargull <andre.bargull at udo.edu> wrote:
>> 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
>>>


More information about the Laszlo-dev mailing list