spacer

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

home / experts / javascript / column20


The EMBED Tag's Controls Attribute

Developer News
News Flash: Adobe Has iPhone Workaround
Adobe's Flash 10.1 Goes Mobile (Minus iPhone)
A Salute to Visionary CEOs

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, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs

webref The latest from WebReference.com Browse >
Building a Banking Application Home Page with OOP · Mixing Scripting Languages · Review: phpFox, a Social Networking CMS with all the Bells and Whistles
Sitemap · Experts · Tools · Services · Email a Colleague · Contact FREE Newsletters 
 The latest from internet.com
Enterprise 2.0: Social Networking in the Cloud · BroadSoft Marketplace Hastens Pace of Telephony Innovation · Review: HTC Hero for Sprint


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

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