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>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2008 Laszlo Systems, Inc.  All Rights Reserved.                   *
* Use is subject to license terms.                                            *
* X_LZ_COPYRIGHT_END ****************************************************** -->

Cross References