<canvas height="120">
<!-- 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="../images/basebutton/button-up.png"/>
<!-- second frame is the mouseover state of the button -->
<frame src="../images/basebutton/button-over.png"/>
<!-- third frame is the mousedown state of the button -->
<frame src="../images/basebutton/button-down.png"/>
</resource>
<!-- include the resource in a view with mouse behaviors -->
<view resource="mybutton_rsrc" onmouseover="setResourceNumber(2)" onmouseout="setResourceNumber(1)" onmousedown="setResourceNumber(3)" onmouseup="setResourceNumber(2)"/>
</canvas>
Name | Source | Image |
---|---|---|
mybutton_rsrc | ../images/basebutton/button-up.png | |
../images/basebutton/button-over.png | ||
../images/basebutton/button-down.png |