play
stop
pause

 

Using the API to play / pause / stop

 

  1. <!-- A simple box style -->
  2. <style type="text/css">
  3. .simpleDivButton, .simpleDivButton:link, .simpleDivButton:hover, .simpleDivButton:visited {
  4. display:inline-block;
  5. background-color: #30AFFF;
  6. border-radius: 12px;
  7. border: 2px solid #9ED4F7;
  8. color: #FFFFFF;
  9. text-align: center;
  10. font-weight: bold;
  11. font-size: 20px;
  12. /*vertical align text using line-height = font-size (don't specify traditional width/height) */
  13. line-height : 20px;
  14. /*center button on page using auto margin-left/right*/
  15. margin-left: auto;
  16. margin-right: auto;
  17. margin-top: 10px;
  18. padding:10px 20px 10px 20px; /* top right bottom left (t r b l = trouble) */
  19. cursor:pointer; /* mouse, so we don't get the text select when over */
  20. }
  21. .simpleDivButton:active {
  22. border: 6px solid #FFFFFF;
  23. background-color: #68C4FF;
  24. /* reduce padding to compensate for the 4px difference between border size */
  25. padding:6px 16px 6px 16px; /* top right bottom left (t r b l = trouble) */
  26. }
  27. </style>
  28.  
  29. <div class="simpleDivButton" onclick="wimpyButton.play('../song3.mp3')">play</div>
  30. <div class="simpleDivButton" onclick="wimpyButton.stop()">stop</div>
  31. <div class="simpleDivButton" onclick="wimpyButton.pause()">pause</div>
giItT1WQy@!-/#