states-$2.lzx
<canvas width="100%">
<view bgcolor="blue" width="20" height="20" onmousedown="this.setAttribute('mouseIsDown', true )" onmouseup=" this.setAttribute('mouseIsDown', false )">
<attribute name="mouseIsDown" value="false
"/>
<handler name="onmouseIsDown">
if(mouseIsDown == true){
ds.setAttribute('applied', true);
} else {
ds.setAttribute('applied', false);
}
</handler>
<state name="ds">
<attribute name="x" value="${parent.getMouse('x') - 10}"/>
<attribute name="y" value="${parent.getMouse('y') - 10}"/>
</state>
</view>
</canvas>
Cross References