Annoy Them with Sound
Drive away your bidders by putting background music and sound effects in your auctions.
Although I despise sound in web pages, I feel compelled to show you how to do it properly so you don’t pick up any bad habits on the street.
Warning
The number-one rule to remember when including sound or music in web pages is to provide a means of turning it off. Otherwise, your bidders will eventually discover the workaround by themselves . . . and they probably won’t come back.
Some Call It Elevator Music
You can insert background music (in either .wav
or .midi format) into your auction with this
line of code:
<bgsound src="http://www.ebayhacks.com/files/aah.wav" loop=1>
where the loop parameter specifies the number of
times to play the sound. The problem is that the
<bgsound> element has no controls: no way
for your customers to turn off the sound or adjust the volume. In
other words, a poor choice.
The more general-purpose <embed> tag can do
everything <bgsound> does, but it also
includes a controller box:
<embed src="http://www.ebayhacks.com/files/aah.wav" hidden=false autostart=true loop=true></embed>
The loop=true parameter can be replaced with
playcount=3 to play the sound a specified number
of times and then stop. Go to http://www.htmlcodetutorial.com for further
documentation on embedded objects.
When to Use Sound
Sound can be useful when text and photos just won’t do. For example, if you’re selling a music box, you may want to include a clip of the music it plays, especially ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access