AnimatedButton

Top  Previous  Next

MoreMotion Face provides a Javascript function class called "AnimatedButton" that wraps an HTML <code>IMG</code> element.

Four button images in the same size should be supplied for Normal, Mouse Over, Mouse Down and Disabled modes of the button.

  <img name="Button1" src="normal.gif" 
       mo:type="AnimatedButton" mo:needsInit="true" 
       mo:props="normalSource:'normal.gif', 
                 mouseOverSource:'mouseOver.gif', 
                 mouseDownSource:'mouseDown.gif', 
                 disabledSource:'disabled.gif'"/>

 

See AnimatedButton Function Class In the MoreMotion Face API.

 

Required Javascript File

This element requires that Buttons.js Javascript file is linked to the page in the HEAD section of the HTML document as follows.

  <head> 
    ...
    <script type="text/javascript" src="moremotion/face/Buttons/Buttons.js"></script>
  </head>