Connecting Tech Pros Worldwide Help | Site Map

Midi player, I can't set volume level...see code here

  #1  
Old July 23rd, 2005, 12:22 PM
rod@mastar.com
Guest
 
Posts: n/a
Help with music volume control... the following code works fine but I can't
seem to control the volume... being to High or FULL... after setting it to
5 or 5% I also set autostart false and the music still autostarts..
Can anyone suggest...


mid0 = "./SYSmidiSounds/Absurdo.MID"
mid1 = "./SYSmidiSounds/HateNoMore.MID"
mid2 = "./SYSmidiSounds/LoombaLoomba.MID"
mid3 = "./SYSmidiSounds/PlanetStupitor.MID"
mid4 = "./SYSmidiSounds/Absurdo.MID"
mid5 = "./SYSmidiSounds/HateNoMore.MID"
mid6 = "./SYSmidiSounds/LoombaLoomba.MID"
mid7 = "./SYSmidiSounds/PlanetStupitor.MID"
mid8 = "./SYSmidiSounds/Absurdo.MID"
mid9 = "./SYSmidiSounds/HateNoMore.MID"
midr = 0
now=new Date()
midr=(now.getSeconds() )%10
mide = " "
if (midr == 0)
..
..
.........
if (midr == 9)
{mide = mid9}
document.write("<embed src='"+mide+"' autostart'false' width='75'
height='45' loop='true' volume='5' </embed> ")


Thanks do appreciate
Rod


  #2  
Old July 23rd, 2005, 12:22 PM
Lee
Guest
 
Posts: n/a

re: Midi player, I can't set volume level...see code here


rod@mastar.com said:[color=blue]
>
>Help with music volume control... the following code works fine but I can't
>seem to control the volume... being to High or FULL... after setting it to
>5 or 5% I also set autostart false and the music still autostarts..
>Can anyone suggest...
>
>
>mid0 = "./SYSmidiSounds/Absurdo.MID"
>mid1 = "./SYSmidiSounds/HateNoMore.MID"
>mid2 = "./SYSmidiSounds/LoombaLoomba.MID"
>mid3 = "./SYSmidiSounds/PlanetStupitor.MID"
>mid4 = "./SYSmidiSounds/Absurdo.MID"
>mid5 = "./SYSmidiSounds/HateNoMore.MID"
>mid6 = "./SYSmidiSounds/LoombaLoomba.MID"
>mid7 = "./SYSmidiSounds/PlanetStupitor.MID"
>mid8 = "./SYSmidiSounds/Absurdo.MID"
>mid9 = "./SYSmidiSounds/HateNoMore.MID"
>midr = 0
>now=new Date()
>midr=(now.getSeconds() )%10
>mide = " "
>if (midr == 0)
>.
>.
>........
>if (midr == 9)
>{mide = mid9}
>document.write("<embed src='"+mide+"' autostart'false' width='75'
>height='45' loop='true' volume='5' </embed> ")[/color]

You haven't set autostart to false. You're missing the "=" sign.

Note that you could eliminate all of those "ifs" by changing your
document.write() to:

document.write("<embed src='mide"+midr+"' autostart='false' width='75'
height='45' loop='true' volume='5' </embed> ")

Closed Thread