Which book did you get that out of? Wow! It looks more like theory, and even if it worked somewhere, it certainly would be restricted to a select portion of the web-browsing audience.
I have never had success manipulating embeds in the manner you are attempting. I realize that browser manufacturers make claims in this regard, but the fact is that you are dealing with (a) the browser, (b) the plug-in/control, (c) the OS, and (d) the drivers for the pertinent hardware. If all of these aren't on the same boat, then you sink.
As you may have noticed, you can't preload an audio file (or video or animation) like you can with a static image. (The others start to execute as soon as they are cached/loaded.) This makes it tough to switch audio, or to cause it to start at a particular time/event without some other means to control it. (Search on "MOD" audio format, and think about an applet to store and play your selections.)
I have had limited success using IFRAMES and FRAMES, by manipulating their SRC attributes.
<script>
function hear(aud) {
document.audioIFRAME.src=aud;
}
</script>
...where the "aud" argument specifies a path to an HTML document with an audio file EMBEDded in it (autostart=true).
Since the media file cannot be preloaded, there is (a) waiting for the HTML file to download, (b) waiting for the media file to download, and (c) waiting for the browser / plug-in to interpret and execute the file.
Check out Beatnik (@Headspace.com), Shockwave/Flash, and the other plug-in technologies that normally deal with timelines and media for better, though proprietary solutions.
Current browser/HTML/Javascript technology is pretty light on multimedia, so you'll need to be patient as you wait for the powers that be to get around to it.
You will want to use that time to read up on proper Javascripting style, as well. Your code is very confusing to a browser, and will cause other kinds of problems if you continue to code that way.
STRINGS ("URLs", 'filenames', etc.) NEED TO BE DEFINED BY START/END QUOTES/APOSTROPHES.
BOOLEAN VALUES (integers, etc.) DO NOT.
Best of luck!