spacer

Webref WebRef   Sitemap · Experts · Tools · Services · Newsletters · About i.com

home / experts / javascript / column20


The EMBED Tag's Controls Attribute

Developer News
Microsoft Shows Off Silverlight 4, IE9 Plans
Metasploit Expands Vulnerability Test Framework
HyperCard Reborn?

Navigator's Controls attribute determines the shape of the <EMBED> tag's control panel. The following table summarizes the different option values:

AttributeDescription
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.

AttributeDescription
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.

http://www.internet.com

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Rolling Out Your Own HTML Application Version Control · HTML 5: Client-side Storage · Working with Ajax Server Extensions
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Wi-Fi Product Watch, November 2009 · Chip Market Recovering From '08 Collapse · Low-Cost Tools to Kickstart Your New Business


Created: May 31, 1998
Revised: May 31, 1998

URL: http://www.webreference.com/js/column20/control.html