Change skin
See the source code for clarity
  1. <!-- Set up a player with the ID attribute set to "myPlayer" -->
  2. <div id="myPlayer" data-wimpyplayer></div>
  3.  
  4. <!-- A little handler function (so our HTML isn't impossible to read). -->
  5. <script>
  6. function changeSkin(theSkinURL){
  7. // Get a handle to the player from the core "wimpy" class,
  8. // by requesting a player via the "getPlayer" method,
  9. // and setting the argument to the same thing as what
  10. // we used as the ID when settign up the player.
  11. var plr = wimpy.getPlayer("myPlayer");
  12. // Now that we have a handle to the player object
  13. // we can use the javascript API method "setSkin"
  14. // to change the skin.
  15. plr.setSkin(theSkinURL);
  16. }
  17. </script>
  18.  
  19.  
  20. <p><input type="button" onclick="changeSkin('../wimpy.skins/301.tsv')" value="Change Skin"></p>
giItT1WQy@!-/#