We accept safe and secure Credit Card and PayPal Payments.
 
Perl Scripts

All Count
Attachment Mailer
Perl Scripts Build A FAQ Plus
Perl Scripts Clock In Center
eBackup Automated
Easy Poll
eSurvey
Fetch a File
Form Maker
Mailing List Server
MySQL Mate
PDF Creation
QCart
Quick Fix
Quote of the day
Speed Search
Task Manager
Traffic Pack
Upload Plus
Upload Gold
Upload Pro
Website Manager

 
Free Perl Downloads

Free Perl Scripts Main Page
Free Perl Scripts 404 Alerter
AccessLog Viewer
Build A FAQ
PHP Scripts eBackup
Free PHP Scripts ErrorLog Viewer
eVars - Server Info
HT Pass Creator
Upload Lite
Website Manager

 
JavaScripts

Free Java Scripts Alert Boxes
Free JavaScripts Browser Sniffer
Check email
Generators
Slide Show
Sudoku
Window Maker
More...

 
Extra Utilities

ASP Scripts Ascii Codes
Free ASP Scripts Color Picker
Font Finder
HT Pass Creator
Meta Cloak
Meta Magic
Pano Zooms
SlideShow
Server Size

 
Online Tutorials

Free HTML Scripts Glossary
Free HTML Scripts HTML
JavaScript
MySQL
SSI
Build Traffic
Other

 
Miscellaneous

About Us
Graphics
Testimonials
Installations
Latest versions

 
Hawk Eye in Tennis

Should Hawk Eye replace linesmen and lineswomen at all tennis tournaments?







 
View all Polls

Run Polls on your site

Run your own Surveys

 
Store Download FAQs Contact Us Support Programming Policies  
Contents Intro Your first page Text Images Links Lists Tables
Frames Forms Sounds Styles Symbols Colors Tags Publish Index

Chapter 9

Sounds

This chapter will cover the tricky subject of adding sounds to web page. Adding a background sound for MSIE is easy enough but there is no guarantee it will work in Netscape Navigator. And , visa versa. Here are the respective commands. Start with the embed tag as there is more chance it will work in both browsers and comes with more attributes.

<Bgsound src="filename.wav" loop="-1">

<embed autostart="true" src="filename.wav" loop="false" height="90" width="150" hidden="false" volume="100">

The effect

Bg sound is for MSIE. Embed is for NN.

Quite simple really. filename.wav is the name of your sound file. It can be a .wav , .midi , .au or any other format you may have. For msie -1 means repeat indefinitely. To have it repeat a certain number of times specify the number. loop='5'. For NN use either true or false. The height and width attributes specify the size of the control panel should you choose to embed one. Do not use the % sign in the volume="" as MSIE reads it a zero.

Sound Link

If you want a sound to offer a sound file for your visitors to download, you can use the <A href=""> tag. The file must be compressed. Here I have used the .zip format. Here is an example.

<A href="filename.zip">Click here to download sound file </a> File size 10kb

The effect

Click here to download sound file

To spice up the look of your page , place an <Img> tag between the opening and closing <A> tag to display an image instead of text.

Advanced

This section will teach you how to use Javascript to embed sounds inside links. You can have a sound play when your visitors pass their mouse over a link or image. The script is lengthy and difficult to comprehend. It comes courtesy of Macromedias Dreamweaver 3 and employs JavaTM as well as JavaScript. Its guaranteed to work in both major browsers. Remember to place the script between the opening and closing <Head> tags at the top of your page.

Script

<Script>
function MM_controlSound(x, _sndObj, sndFile) {
var i, method = "", sndObj = eval(_sndObj);
if (sndObj != null) {
if (navigator.appName == 'Netscape') method = "play";
else {
if (window.MM_WMP == null) {
window.MM_WMP = false;
for(i in sndObj) if (i == "ActiveMovie") {
window.MM_WMP = true; break;
} }
if (window.MM_WMP) method = "play";
else if (sndObj.FileName) method = "run";
} }
if (method) eval(_sndObj+"."+method+"()");
else window.location = sndFile;
}
</Script>


You must use the following html code between the opening and closing <body> tags.

<embed name='MM_playSound' src='filename.wav' loop=false autostart=false mastersound='mastersound' hidden=true volume=100 width=0 height=0></embed>

<a href="#" onmouseover="MM_controlSound('play', 'document.MM_playSound', 'filename.wav');">play</a>

The effect

play

Dont ask me to explain the script , because not even I understand it. What I can tell you , is the easiest way to employ this script is to copy and paste it into your html page. You need to change 'filename.wav' to your file name two times. Once in <A href=""> tag and once in the <embed> tag.

To add different sounds inside different links , you need to change in the <embed> tag

name='MM_playSound' to name='MM_playSound2'

and in the <A href=""> tag change

onmouseover="MM_controlSound('play', 'document.MM_playSound', 'filename.wav');"
to
onmouseover="MM_controlSound('play', 'document.MM_playSound2', 'filename.wav');"


Go ahead and record your own sounds to add to your page. Let me hear that riff again. Enjoy :-)



Contents Intro Your first page Text Images Links Lists Tables
Frames Forms Sounds Styles Symbols Colors Tags Publish Index
Speed Search our site
Survey Software
Create unlimited web based surveys on your website from your website

Mailing list management made easy

Discounted Scripts
Subscribe to our periodial newsletter to receive special offers.

Bathroom Hygiene
How often do you thoroughly clean your bathroom?








View all Polls

Run Polls just like this one on your website!


About us | Contact us | Script FAQs | Script Support | Website Hosting | Our Policies | Store | Testimonials
Subscribers log in here. Subscribe to our periodical newsletter for special offers on commercial scripts, hosting, exciting business opportunities, and industry news and events. Our Mailing List Software is powered by Consolidator    
HTML Plain text
©1999 - 2015 All content Copyright PerlScriptsJavaScripts.com Proudly hosted by LinuxHostingPlans.com