<canvas height="150">
<!-- first create the multi-frame resource and give it a name -->
<resource name="mybutton_rsrc">
<!-- first frame MUST be the mouseup state of the button -->
<frame src="resources/basebutton/button-up.png"/>
<!-- second frame MUST be the mouseover state of the button -->
<frame src="resources/basebutton/button-over.png"/>
<!-- third frame MUST be the mousedown state of the button -->
<frame src="resources/basebutton/button-down.png"/>
</resource>
<!-- Second, assign the resource to a basebutton tag -->
<basebutton resource="mybutton_rsrc"/>
<button onclick="animate('x', 100, 1000, true)" src="resources/basebutton/button-up.png">
Move <b>me</b>
</button>
</canvas>
Name | Source | Image |
---|---|---|
mybutton_rsrc | resources/basebutton/button-up.png | |
resources/basebutton/button-over.png | ||
resources/basebutton/button-down.png |