Untitled

From Denim Penguin, 2 Years ago, written in Plain Text, viewed 73 times.
URL https://paste.bugabuse.net/view/f5624b57 Embed
Download Paste or View Raw
  1. bgsound id=midibox loop=0 volume=0 autostart=yes>
  2. <bgsound id=wavebox loop=0 volume=0 autostart=yes>
  3.  
  4. <script language="javascript">
  5. var fadestop=null;
  6. var fade=50;
  7. var fademidi;
  8. var fadevol=0;
  9.  
  10. function dofade() {
  11. fade=fade+1;
  12. midibox.volume = -(fade*100);
  13. if (fade>=36) {
  14. clearInterval(fadestop);
  15. clearInterval(fadestop);
  16. midibox.src=fademidi; midibox.volume=fadevol; fade=-(fadevol/100);
  17. clearInterval(fadestop);
  18. clearInterval(fadestop);
  19. }
  20. }
  21.  
  22. function givetrue() {
  23. return true;
  24. }
  25.  
  26. function musicloop() {
  27. var midi=document.app.getmidi();
  28. if (midi!="none") {
  29. if (fadestop!=null)
  30. clearInterval(fadestop);
  31. var midivol=document.app.getmidivol();
  32. var midifade=document.app.getmidifade();
  33. if (midi=="stop") {
  34. midibox.src="c:\silence.mid";
  35. fade=50;
  36. return;
  37. }
  38. if (midi=="voladjust") {
  39. midibox.volume=midivol;
  40. if (midifade==1)
  41. fade=-(midivol/100);
  42. else
  43. fade=50;
  44. return;
  45. }
  46. if (midifade==1) {
  47. fademidi=midi;
  48. fadevol=midivol;
  49. if (fadestop!=null)
  50. clearInterval(fadestop);
  51. fadestop=setInterval("dofade()",200);
  52. } else {
  53. midibox.src=midi; midibox.volume=midivol; fade=50;
  54. }
  55. }
  56. var wave=document.app.getwave();
  57. if (wave!="none") {
  58. var wavevol=document.app.getwavevol();
  59. wavebox.src=wave; wavebox.volume=wavevol;
  60. }
  61. }
  62. function startloop() {
  63. onerror=givetrue;
  64. setInterval("musicloop()",50);
  65. }
  66. </script>

Reply to "Untitled"

Here you can reply to the paste above