On Tue, 13 Apr 2004 03:46:57 +0200, "Ivo" <no@thank.you> wrote:
[color=blue]
>"Jim Ley" <jim@jibbering.com> wrote[color=green]
>> kaeli <tiny_one@NOSPAM.comcast.net> wrote:[color=darkred]
>> > article <407A92CA.4D96FB3F@theworld.com>asked
>> >> How can I create a beep in javascript (I.E. 5.5 +) ?
>> >>
>> >
>> >You can't.
>> >You'd need a sound file, like a .wav.[/color]
>>
>> Well if you're willing to limit yourself to IE, you can actually
>> create sounds without any external files, or non-default installed
>> tech.
>>
>>
http://jibbering.com/directanimation/sound.html[/color]
>
>Using IE6, I am greeted with an error on that page: "'DACtl' is undefined"
>on line 4. This is reported in the usual alert box with my usual alert
>sound. There you go.[/color]
Sorry, it seemed to have got screwed up at some point:
<BODY>
<OBJECT id=DACtl CLASSID="CLSID:B6FFC24C-7E13-11D0-9B47-00C04FC2F51D"
style="height:1;width:1;top:0;left:0;"></OBJECT>
<SCRIPT>
m = DACtl.MeterLibrary;
snd = m.SinSynth.Rate(800); // 800khz sine wave.
snd2=snd.RateAnim(m.Add(m.DANumber(3),m.Cos(m.loca lTime)));
snd3=snd.RateAnim(m.Div(m.Sin(m.localTime),m.Cos(m .localTime)));
DACtl.Sound = snd3;
// change snd to snd2 and snd3 for more interesting sounds.
DACtl.image = m.solidColorImage(m.White);
DACtl.Start();
</SCRIPT>
</Body>
cheers,
Jim.
--
comp.lang.javascript FAQ -
http://jibbering.com/faq/