[Laszlo-dev] For Review: Change 20090302-hqm-y Summary: catch and forward mouse clicks from TextField
Henry Minsky
henry.minsky at gmail.com
Mon Mar 2 18:59:59 PST 2009
This isn't really a fix for this bug, but more an experiment to see if
we can make swf9 emulate the behavior of clicking
on text links in swf8.
Change 20090302-hqm-y by hqm at badtzmaru.home on 2009-03-02 21:49:53 EST
in /Users/hqm/openlaszlo/trunk3
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: catch and forward mouse clicks from TextField
New Features:
Bugs Fixed: LPP-7551
Technical Reviewer: andre, max
QA Reviewer: (pending)
Doc Reviewer: (pending)
Documentation:
Release Notes:
Details:
+ this is a test of the idea of catching all mouse events on a
TextField, and
dispatching them to the next view behind
mouseEnabled is always set to true for the TextField in LzTextSprite,
and all mouse
events are caught and forwarded back to the view behind the text field.
Tests:
+ second test case from LPP-7551, behaves more like swf8
<canvas debug="true">
<view width="200" height="100%" bgcolor="#aaaaff">
<handler name="onclick" >
var newbg = (this.bgcolor == 0xaaaaff ? 0xaaffaa : 0xaaaaff);
this.setAttribute("bgcolor", newbg);
</handler>
</view>
<text multiline="true" width="150">
<handler name="oninit" ><![CDATA[
this.format("click <u>%s</u> or <u>%s</u>",
this.makeTextLink("here", "opt1"),
this.makeTextLink("here", "opt2"));
]]></handler>
<handler name="ontextlink" args="val" >
this.addFormat("\noption %d was clicked", val == "opt1" ? 1 : 2);
</handler>
</text>
</canvas>
Files:
M WEB-INF/lps/lfc/kernel/swf9/LzTextSprite.as
M WEB-INF/lps/lfc/views/LzText.lzs
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090302-hqm-y.tar
More information about the Laszlo-dev
mailing list