PDA

View Full Version : Playing sound in a script?


Narz
02-12-2003, 10:38 PM
Hi, whats the most universally compatable (Netscape & IE, Mac & PC) way to simply play a sound in a script in JavaScript. Thanks!

top500
02-17-2003, 02:15 AM
ck diz - works w/ nie msie aoe (99%)

goes in body, works w/ wav 'n mid

<embed SRC="whatever.mid" ALIGN="center" WIDTH="0" HEIGHT="0" AUTOPLAY="true" LOOP="true" BORDER="1" volume="60">

variablez - width=0 / height=0 for invisible plugin - autoplay must be true then.

for visible plug, height=20 width=60 or so

Loop - true or false, can be left out -> default F
autoplay - same as loop.

border - i am not sure if this does anything

volume=" is in percent of the client current volume set. if client has volume half-way up, then 100 is half-way up, 50 is half, and so on. A good setting is 40 to 60... 40 is very quiet, while 60 won't scare'um outta dar seat.
G'Luck!