473,466 Members | 1,369 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Alternative to Embeds playing WAV in HTML ?

IE5.5

It's probably an oft repeated question but I have some code that used to
work but does not now.

This line in my Javascript code give an error now.

document.embeds[Math.floor(Math.random()*6)].play();

And the following are the six lines of WAV files that used to be played at
random when a timed event happened.

<embed src="ukatc32.wav" width="1" height="1" autostart="false"
hidden="true" />
<embed src="ukatc41.wav" width="1" height="1" autostart="false"
hidden="true" />
<embed src="ukatc42.wav" width="1" height="1" autostart="false"
hidden="true" />
<embed src="ukatc90.wav" width="1" height="1" autostart="false"
hidden="true" />
<embed src="ukatc92.wav" width="1" height="1" autostart="false"
hidden="true" />
<embed src="ukatc93.wav" width="1" height="1" autostart="false"
hidden="true" />

I've been looking for an alternative to 'embed' without the user having
download yet another plugin, so what is the alternative ?

Thanks,

Richard Brooks.
Jul 23 '05 #1
2 1594
Richard Brooks wrote:
IE5.5

It's probably an oft repeated question but I have some code
that used to work but does not now.

This line in my Javascript code give an error now.

document.embeds[Math.floor(Math.random()*6)].play();

<snip>

if((document.embeds)&&
(document.embeds.length >= 5)){
var em = document.embeds[Math.floor(Math.random()*6)];
em.volume = -1;
em.play();
}

- Seems to work OK on IE 6.

Richard.
Jul 23 '05 #2
Richard Cornford wrote:
Richard Brooks wrote:
IE5.5

It's probably an oft repeated question but I have some code
that used to work but does not now.

This line in my Javascript code give an error now.

document.embeds[Math.floor(Math.random()*6)].play();
<snip>


if((document.embeds)&&
(document.embeds.length >= 5)){
var em = document.embeds[Math.floor(Math.random()*6)];
em.volume = -1;
em.play();
}

- Seems to work OK on IE 6.

Richard.


I hate those strange things that happen! All I did was to archive the stuff
to CDR then some months put it all back without changine version of IE and
set the read only archive bit of the archived files to off just in case then
it throws the error up only in that section.

Thanks for having a look, Richard,
Richard.
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: zorro | last post by:
Hello there, I'm really stumped... I'm fetching a web page with a script and parsing it. There is a problem because the response inserts '8 1ff8' in random places. For example, I get things...
6
by: Andy Fish | last post by:
Hi, I want to use an anchor tag to invoke some javascript and I've read that it's bad form to use <a href="javascript:foo()"> I've read endless usenet posts and hint sites on the net, they all...
9
by: MTriggs886 | last post by:
There isn't a command that exists that can serve as an alternative to EMBED in HTML 4.01 Transitional coding, is there? I've historically used this command to play MIDI files in the background of...
1
by: Julius Mong | last post by:
Dear all, if I have something like this: <html> <body> <embed src="..." id="svgPage" /> </body> </html> and I did this in the same doc:
2
by: Art | last post by:
Is document.embeds still a part of the current/latest javascript DOM ?
5
by: joe | last post by:
Hi. Is there a way with Javascript to use a generic image if the one I want is not found? I'd appreciate if someone can post a code sample, or poit me to one. Thanks in advance.
0
by: sachintandon | last post by:
Hello all, Thanks in advance for your help I have a problem in sending emails, my requirement is to send multipart alternative emails with attachments, I'm able to send text with attachments or...
7
by: yomgui | last post by:
Hi, Eclipse is just not really working on linux 64 bit (I tried ubuntu and centos, it is freesing and crashing and extremly slow) I use eclipse for python and cvs, what is "the" good...
35
by: Dan Rumney | last post by:
Hi all, I've been writing Javascript for quite a while now and have, of late, been writing quite a lot of AJAX and AJAX-related code. In the main, my dynamically generated pages are created...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.