Web Development HTML Guide - Learn HTML
Developer Tutorials
ASP
CGI & Perl
CSS
Flash
HTML
Java
JavaScript
Linux
MySQL
PHP
Photoshop
Python
Wireless
XML



Developer Manuals
Learn HTML
Learn PHP
Learn MySQL
Learn CSS
Learn Pear


Developer Scripts
ASP Scripts
ASP.NET Scripts
CGI & Perl Scripts
Flash Scripts
Java Scripts
JavaScript Scripts
PHP Scripts
Python Scripts
Remotely Hosted Scripts
Tools & Utilities Scripts
XML Scripts

Developer Resources
Developer Tools
Developer News
Developer Forums
Developer Content
Developer Book Reviews
Survey Software

Web Hosting Directory
Budget Web Hosting
ColdFusion Hosting
Dedicated Servers
Domain Hosting
E-Commerce Hosting
Email Hosting
Free Web Hosting
Linux Web Hosting
Managed Hosting
Reseller Hosting
Small Business Hosting
Windows Web Hosting

Attribute for <EMBED ...>
MASTERSOUND

Usage Recommendation
Only use this attribute if you also use the NAME attribute and the embedded object is a sound

MASTERSOUND, which only works with Netscape, is required if you are embedding a sound and if you use the NAME attribute.

MASTERSOUND is also for the unusual situation where you would like to spread the controls for a single sound around different places on the page. MASTERSOUND allows several <EMBED ...>'s to control a single sound. This is usually done in conjunction with the CONTROLS attribute so that one object displays the volume control, another the start button, another the pause button, etc.

Consider the situation where we want to have the play button, pause button, stop button and volume lever all in different cells of a table, but they all control one sound. We could do this with the following (lengthy) code:

<TABLE BGCOLOR=RED BORDER>
<TR ALIGN=CENTER>
<TD><EMBED 
    SRC="../graphics/sounds/1812over.mid"
    NAME="SoundGroup"
    WIDTH=34 HEIGHT=23
    CONTROLS=PLAYBUTTON
    MASTERSOUND
    ><BR>Play</TD>

<TD><EMBED 
    SRC="stub1.mid" 
    NAME="SoundGroup"
    WIDTH=34 HEIGHT=23
    CONTROLS=PAUSEBUTTON
    ><BR>Pause</TD>

<TD><EMBED 
    SRC="stub2.mid" 
    NAME="SoundGroup"
    WIDTH=34 HEIGHT=23
    CONTROLS=STOPBUTTON
    ><BR>Stop</TD>

<TR ALIGN=CENTER>
<TD COLSPAN=3 ALIGN=CENTER><EMBED 
    SRC="stub3.mid" 
    NAME="SoundGroup"
    WIDTH=74 HEIGHT=20
    CONTROLS=VOLUMELEVER
    ><BR>Volume</TD>
</TR>
</TABLE>

This would create this set of sound controls:


Play

Pause

Stop

Volume

Notice several things about using MASTERSOUND:

  • Every sound <EMBED ...> in the group must use the NAME attribute, and they must all have the same name. If you use the MASTERSOUND attribute, even for just one sound <EMBED ...>, you must use NAME.
  • One and only one of the sound <EMBED ...>'s must have the MASTERSOUND attribute.
  • Each <EMBED ...> uses the CONTROLS attribute to indicate a different type of sound control.
  • Only the MASTERSOUND tag needs to point to the sound file, but they must all point to some sound file of the same type so that the browser knows all of the <EMBED ...>'s are of the same type. Netscape recommends that all <EMBED ...>'s in the group beside the MASTERSOUND one point to "stub" files. Stub files are dummy files which aren't really sound files at all, but just text files one character long (all of the stub files used above consist of a single 'x'). The browser never reads the stub files, but it sees that they are of the same type of file as the MASTERSOUND file.

The use of MASTERSOUND as a multi-control interface has been a confusing addition to HTML, but to make matters worse it doesn't even work very well in Netscape. There have been consistent problems with the controls appearing not as buttons or sliders but as empty gray boxes. Microsoft has not seen fit to waste its time copying Netscape's MASTERSOUND.


Copyright Idocs, Inc. Written by Miko Sullivan











About the NetVisits, Inc Network | Advertise
Developer Tutorials hosted by HostGator.
Copyright ©2007 NetVisits, Inc Network. All Rights Reserved. Privacy Policy.
Visit other NetVisits, Inc. sites: