Lesson No.
9
- Sounds -
In this
lesson, you will be learning how to add music to your web page.
The command which we will
be using are <BGSOUND> and <EMBED>
Internet Explorer supports the tag <BGSOUND>
and Netscape supports the the tag <EMBED>
Example # 1 - Internet Explorer
In this example, you will see how to
add sounds that will repeat itself for 3 times and
then stop.
<BGSOUND SRC="filename.wav" LOOP="3">
(Note: You can also play Midi extension - .mid)
Example # 2 - Netscape
Here is the code to get music playing on Netscape with 3 loops.
<EMBED
SRC="filename.mid" HEIGHT="72"
WIDTH="15" LOOP="3"
NAME="Buddy" AUTOSTART="TRUE">
As you can see
the EMBED=SRC=" "
is where you enter your Midi file,
The HEIGHT and WIDTH is
where you define how length or width the player,
LOOP=" " is
where you tell how many times to repeat the music,
the AUTOSTART=" "
(TRUE or FALSE) tells the browser whether or not to play the music when the page reloads,
and the NAME=" "
is where you enter the Name of the Sound (so, when someone moves his/her mouse to the
player, it will display the name of the song which is being played on his/her speakers)
End of Lesson No. 9
BACK
(c) 1998 Sinh Truong Nguyen.
All Rights Reserved. |