[Laszlo-dev] implementing non-rectangular masks in LZX
Sarah Allen
sallen at laszlosystems.com
Sat Jun 10 00:37:27 EDT 2006
I did a little looking into how this is done in Flash (swf7, scriptable
masks). If you are intested, there's a nice tutorial here:
http://www.kirupa.com/developer/actionscript/scriptable_masks.htm . The
cliff notes are:
myMovieClip.setMask(maskMovieClip)
After playing with it a bit, I think I want a mask to be another view,
so I can resize and position it. Ideally something like:
<view resource="myimage_rsc" mask="anotherview"/>
I created a little test with the ActionScript inlined just to get the
hang of things. This works fine:
<view id="myview" resource="photo.jpg">
<method name="setMask" args="v">
Debug.write('setMask', v, v.__LZmovieClipRef);
this.__LZmovieClipRef.setMask(v.__LZmovieClipRef)
</method>
</view>
<view id="mymask" oninit="myview.setMask(this)" resource="star.swf"
x="130" y="-20" width="200" height="200" stretches="both"/>
However, when I make the mask clickable (simply setting clickable="true"
will do it), the mask disappears when my mouse goes out of the mask's
bounds and reappears when the mouse goes back in. I didn't see anything
magic in LzView's setClickable.
Can anyone else give me a clue as to why this would happen?
Thanks,
Sarah
p.s. I've been testing in lps-3.3. As soon as I sync trunk, I'll check
into a test directory if anyone else wants to see it in action.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20060610/c2c23a58/attachment.html
More information about the Laszlo-dev
mailing list