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 |
Ok, not that you have the basics on embedding sounds, let's play with the parameters a little. The tags on this page primarily apply to <embed> tags because most won't work on <bgsound> tags. So far, you've only seen autostarts and hidden files. Time to bring the files out of hiding. Hidden So far, you have only had hidden files. You have learned two ways of making embedded sounds hidden. This first is to add the note "hidden=true" into the tag.
Autoplay The "autoplay" command has two settings; true and false. When it is set to true, it will start the music immediately. If it is set to false, the user must hit the play button. Here is the code and what it looks like:
That bar is big and cumbersome, but you can make it smaller. That's why you'll next learn width and height commands. Width and height This time we'll add width and height commands to the sound. Here ya go:
That's a little awkward, but it can be useful. Another way of controlling the height and width is through "console" features. Controls Look at this one:
Sometimes you can change the size of the display using these commands. Some computers read them better than others though, so good luck. Another use for "controls" is choosing which buttons you'd like to display. Here we go with that:
Looping So far, we've only had a sound that loops once, but it's possible to get a sound to loop several times, or even forever. Please don't do this though. It's nastily annoying. I'll show you how to do it, but please promise you won't use it. Please? Do you want to know why? Embed:
This one will loop forever. Please, for heaven's sake, don't use it. This one will loop twice. Some computers will read the "loop" command and some will read the "playcount" command, so it's best to include both.
This one will loop forever. Note that it says "autostart" instead of "autoplay". Keep in mind that there is no guarantee any of these will work on other people's computers. Use at your own risk. Volume One last thing. You can sometimes set the volume of your sound. The default volume is 50%, but you can set it anywhere from zero to 100%. Here we go:
Once again, you're at the mercy of the operating system of the user, but it sometimes works. Good luck. |