Embedding Sound in Web Pages, Part I: The EMBED Tag's Controls Attribute - Doc JavaScript
The EMBED Tag's Controls Attribute
Navigator's Controls attribute determines the shape of the <EMBED>
tag's control panel. The following table summarizes the different option values:
Attribute | Description |
CONTROLS="console" | Specifies the default control panel with a start button, a stop button, a pause button, and a volume lever. Use WIDTH="144" and HEIGHT="60" . |
CONTROLS="smallconsole" | Specifies a much shorter control panel with a start button, a stop button, and a volume lever. Use WIDTH="144" and HEIGHT="15" . |
CONTROLS="playbutton" | Specifies a much reduced control panel with only a play button. Use WIDTH="35" and HEIGHT="23" . Usually used with the MASTERSOUND attribute (see below). Navigator 4.04 on Mac crashes if CONTROLS="playbutton" . |
CONTROLS="pausebutton" | Specifies a much reduced control panel with only a pause button. Use WIDTH="35" and HEIGHT="23" . Usually used with the MASTERSOUND attribute (see below). |
CONTROLS="stopbutton" | Specifies a much reduced control panel with only a stop button. Use WIDTH="35" and HEIGHT="23" . Usually used with the MASTERSOUND attribute (see below). |
CONTROLS="volumelever" | Specifies a much reduced control panel with only a volume lever. Use WIDTH="74" and HEIGHT="20" . Usually used with the MASTERSOUND attribute (see below). |
The MASTERSOUND
attribute lets you control a single sound track with multiple control panels, usually single-buttoned, as explained above. When combining several buttons to control a single sound file, you must follow certain rules:
- Use the same
NAME
attribute on all buttons. - Only one button is tagged with
MASTERSOUND
. - The button tagged with
MASTERSOUND
must point to the sound file. Other may point to other files, but they must point to some files.
Here is a simple example that shows how to synchronize four different buttons to control a single sound track:
<TABLE BORDER="1" CELLSPACING="0" CELLPADDING="3">
<TR><TD><EMBED SRC="aladdin.mid" WIDTH="35" HEIGHT="23" -->
CONTROLS="playbutton" NAME="foobar" MASTERSOUND></TD>
<TD><EMBED SRC="xfiles.mid" WIDTH="35" HEIGHT="23" -->
CONTROLS="pausebutton" NAME="foobar"></TD>
<TD><EMBED SRC="xfiles.mid" WIDTH="35" HEIGHT="23" -->
CONTROLS="stopbutton" NAME="foobar"></TD>
<TD><EMBED SRC="xfiles.mid" VOLUME="50" WIDTH="74" HEIGHT="20" -->
CONTROLS="volumelever" NAME="foobar"></TD></TR>
</TABLE>
Explorer's CONTROLLER
attribute is similar to Navigator's CONTROL
attribute. It specifies whether to display the control panel or not. Even if the control panel is not displayed, you can still control the media object by clicking the right mouse on it, and then selecting one of the menu options (bringing back the control, adding the digital display, or just running the sound track). Notice that the digital display can be added to any control panel by the same right clicking.
Attribute | Description |
CONTROLLER="true" | Specifies the default control panel with a start&pause button, a stop button, and a position lever. Use WIDTH="200" and HEIGHT="60" . |
CONTROLLER="false" | Specifies no control panel. Use WIDTH="200" and HEIGHT="15" . Try right-clicking the object where it is supposed to be placed. The popup menu allows you to bring back the controls and the digital control display. |
Created: May 31, 1998
Revised: May 31, 1998
URL: https://www.webreference.com/js/column20/control.html