KXStudio Website https://kx.studio/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
767B

  1. var ap_instances = new Array();
  2. function ap_stopAll(playerID) {
  3. for(var i = 0;i<ap_instances.length;i++) {
  4. try {
  5. if(ap_instances[i] != playerID) document.getElementById("audioplayer" + ap_instances[i].toString()).SetVariable("closePlayer", 1);
  6. else document.getElementById("audioplayer" + ap_instances[i].toString()).SetVariable("closePlayer", 0);
  7. } catch( errorObject ) {
  8. // stop any errors
  9. }
  10. }
  11. }
  12. function ap_registerPlayers() {
  13. var objectID;
  14. var objectTags = document.getElementsByTagName("object");
  15. for(var i=0;i<objectTags.length;i++) {
  16. objectID = objectTags[i].id;
  17. if(objectID.indexOf("audioplayer") == 0) {
  18. ap_instances[i] = objectID.substring(11, objectID.length);
  19. }
  20. }
  21. }
  22. var ap_clearID = setInterval( ap_registerPlayers, 100 );