ugrás a tartalomhoz

Archívum - Aug 11, 2010 - Fórum téma

Hangerő módosítása

Roberto76 · 2010. Aug. 11. (Sze), 13.20
Sziasztok!
Elsőként: eléggé amatőr vagyok ebben a témában, úgyhogy bocs ha rossz helyre írtam (lehet hogy a flash-be kellett volna) szóval adott ez a sound.js fileom, és ebben szeretném a hangerőt változtatni. Jelenleg iszonyú halk, és szeretném a rendszer hangerejéhez igazítani. Mit és hová kellene írnom? Köszönöm előre is.
  1. var aySound = new Array();  
  2. aySound[0] = "mon_son.wav";  
  3.   
  4. document.write('<BGSOUND id="auIEContainer">')  
  5. IE = (navigator.appVersion.indexOf("MSIE")!=-1 && document.all)? 1:0;  
  6. NS = (navigator.appName=="Netscape" && navigator.plugins["LiveAudio"])? 1:0;  
  7. ver4 = IE||NS? 1:0;  
  8. onload=auPreload;  
  9.   
  10. function auPreload() {  
  11. if (!ver4) return;  
  12. if (NS) auEmb = new Layer(0,window);  
  13. else {  
  14. Str = "<DIV ID='auEmb' STYLE='position:absolute;'></DIV>";  
  15. document.body.insertAdjacentHTML("BeforeEnd",Str);  
  16. }  
  17. var Str = '';  
  18. for (i=0;i<aySound.length;i++)  
  19. Str += "<EMBED SRC='"+aySound[i]+"' AUTOSTART='FALSE' HIDDEN='TRUE'>"  
  20. if (IE) auEmb.innerHTML = Str;  
  21. else {  
  22. auEmb.document.open();  
  23. auEmb.document.write(Str);  
  24. auEmb.document.close();  
  25. }  
  26. auCon = IE? document.all.auIEContainer:auEmb;  
  27. auCon.control = auCtrl;  
  28. auCon.volume=-1900  
  29. }  
  30. function auCtrl(whSound,play) {  
  31. if (IE) this.src = play? aySound[whSound]:'';  
  32. else eval("this.document.embeds[whSound]." + (play? "play()":"stop()"))  
  33. }  
  34. function playSound(whSound) { if (window.auCon) auCon.control(whSound,true); }  
  35. function stopSound(whSound) { if (window.auCon) auCon.control(whSound,false); }  
  36.   
  37. aySound[0]="custom_files/sound.mp3";