media-resources-$5.lzx

<canvas height="120" width="100%">
  <!-- create the multi-frame resource and give it a name -->
  <resource name="mybutton_rsrc">
    <!-- first frame is the mouseup state of the button -->     
    <frame src="resources/button-up.png"/>   
    <!-- second frame is the mouseover state of the button -->     
    <frame src="resources/button-over.png"/> 
    <!-- third frame is the mousedown state of the button -->     
    <frame src="resources/button-down.png"/> 
  </resource>

  <!-- attach the resource to a view with mouse events -->
  <view resource="mybutton_rsrc" onmouseover="setAttribute('frame', 2)" onmouseout="setAttribute('frame', 1)" onmousedown="setAttribute('frame', 3)" onmouseup="setAttribute('frame', 2)"/>

</canvas>
<!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
* Copyright 2007, 2008 Laszlo Systems, Inc.  All Rights Reserved.                   *
* Use is subject to license terms.                                            *
* X_LZ_COPYRIGHT_END ****************************************************** -->

Cross References

Resources

Name Source Image
mybutton_rsrc resources/button-up.png
resources/button-over.png
resources/button-down.png