Section 2 - Basics Lists Basic Tables Marquee Meta Sounds Sound files Links to files Should you? You Try It! Comments Section 4 - Advanced Section 5 - Publishing Section 6 - Extras Appendices |
There is another way to put sound into your documents. That is with an embedded sound file. This file can either begin playing automatically or it can be controlled by the user. You get to specify how it's being used. Before adding sound to all of your documents, I suggest reading the section entitles Should you? that you'll encounter in a couple of lessons. Anyway, the easiest way to embed a sound into your document is with the following command. We'll use the "trumpet.wav" we heard at the beginning of this lesson.:
Is though be noted that Internet Explorer didn't always read the embed tag. It used to use a tag called "bgsound" instead. To get a sound to play, a programmer used to have to type both commands into the code, making it look more like this:
Compare the two "embed" tags on this page. You'll notice that the first one has "hidden=true" as part of its name. That will make the sound truly background and out of control of the user. The second isn't "hidden" but it sets height and width at zero. This also makes the file virtually hidden. You might also note that they both say "autostart." This means that the computer automatically starts the sound once the computer loads it. If you have a hidden sound file and it doesn't have autostart, it will never be heard. The bgsound file automatically hides and starts the file. |