EMBED + Javascript = ?

J

joemono

Hi, I've been searching all over for an answer to this question. I haven't
found one yet, but I appologize if there's something blatant that I've
missed.

I've got something like this:

<EMBED SRC="clip_1.wav" HIDDEN="true" NAME="my_sound"
ENABLEJAVASCRIPT="true">

and a function such as this:

function change_track(track)
{
document.my_sound.src = track;
document.my_sound.play();
}

This doesn't work, and I'm sure that makes complete sense. However, this is
essentially the functionality I'm looking for:

I want to take an EMBED tag, and dynamically alter the source of the file
(it only needs to work in IE). Is something like this even possible?
(Without hardcoding every possible clip the user could choose?) I've gotten
this to work perfecly using BGSOUND, but unfortunately I am not permitted to
use that tag (I can't explain it, because to be honest, I don't know.)

Any help is greatly appreciated!

Joe

PS Forgive me if I missed something in my explanation, I'm a little (a lot?)
absent minded sometimes...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,070
Latest member
BiogenixGummies

Latest Threads

Top