please dont rip this site

The <BGSOUND> element allows authors to create pages that will play sound clips, or background soundtracks while the page is being viewed Sounds can either be samples (.WAV or .AU format) or MIDI (.MID format).

The HTML used to insert a background sound into a page is:

<BGSOUND SRC="start.wav">

The BGSOUND element accepts the following attributes.

BALANCE=Stereo balancing
The BALANCE attribute can be used to change the stereo balance when the sound file is played. It accepts values between '-10000' and '10000'. The effect of the two extreme values depends on the sound settings on the users system, but using either of the extreme values will force the sound to play from one speaker only.

The CLASS attribute is used to specify the <DIR> element as using a particular style sheet class. See the Style Sheets topic for details.

The ID attribute can be used to either reference a unique style sheet identifier, or to provide a unique name for the <DIR> element for scripting purposes. Any <DIR> element with an ID attribute can be directly manipulated in script by referencing its ID attribute, rather than working through the All collection to determine the element. See the Scripting introduction topic for more information.

The LANG attribute can be used to specify what language the <DIR> element is using. It accepts any valid ISO standard language abbreviation (for example "en" for English, "de" for German etc.) For more details, see the Document Localisation section for more details.

This attribute specifies how many times a sound will loop when activated. If n=-1 or LOOP=INFINITE is specified, the sound will loop indefinitely.

This attribute specifies the address of a sound to be played.

The Internet Explorer 4.0 (and above) specific TITLE attribute is used for informational purposes. The <BGSOUND> attribute presents nothing on the screen, so no 'ToolTip' is provided by the TITLE attribute.

The VOLUME attribute accepts values between '-10000' and 0 and can be used to set the volume at which the sound file will play. Note that using '0' (i.e. maximum volume), will play the sound file at 100% of the users current volume settings. There is no way in HTML that you can force a sound file to play at a volume indecent to the user. They will always have total control.

This page has a background soundtrack playing if you are using Internet Explorer. The code used is:

<BGSOUND SRC="../Dynamic_Documents/clouds.mid">

NOTE : Internet Explorer now fully supports use of Netscape plug-ins using the <EMBED...> element. Therefore, using :

<EMBED SRC="../Dynamic_Documents/clouds.mid" HIDDEN="True">

will produce the same effect as using the above <BGSOUND...> element (and will also work in Netscape (3.0 and above)). The actual <BGSOUND...> element is still Internet Explorer specific though.

Every <BGSOUND> element in a document is an object that can be manipulated through scripting. Note that scripting of the <BGSOUND> element/object is only supported by Internet Explorer 4.0, as only Internet Explorer supports the <BGSOUND> element.

<BGSOUND...> Properties
The <BGSOUND...> element/object supports all of the standard Dynamic HTML properties (i.e. className, document, id, innerHTML, innerText, isTextEdit, lang, language, offsetHeight, offsetLeft, offsetParent, offsetTop, offsetWidth, outerHTML, outerText, parentElement, parentTextEdit, sourceIndex, style, tagName and title). Details of these can be found in the standard Dynamic HTML properties topics.
Also, the <BGSOUND> element supports the balance, loop, src and volume properties, which directly reflect their attribute settings (see above).

<BGSOUND...> Methods
The <BGSOUND...> element/object supports some of the standard Dynamic HTML methods (i.e. contains, getAttribute, removeAttribute and setAttribute). Details of these can be found in the standard Dynamic HTML Methods topics.

<BGSOUND...> Events
The <BGSOUND...> element/object doesn't support any events

See also:



file: /Techref/language/html/ib/Media_Embedding/bgsound.htm, 19KB, , updated: 2010/3/10 06:09, local time: 2024/6/17 09:31,

 ©2024 These pages are served without commercial sponsorship. (No popup ads, etc...).Bandwidth abuse increases hosting cost forcing sponsorship or shutdown. This server aggressively defends against automated copying for any reason including offline viewing, duplication, etc... Please respect this requirement and DO NOT RIP THIS SITE. Questions?
Please DO link to this page! Digg it! / MAKE!

<A HREF=""> &lt;BGSOUND&gt;</A>

After you find an appropriate page, you are invited to your to this massmind site! (posts will be visible only to you before review) Just type a nice message (short messages are blocked as spam) in the box and press the Post button. (HTML welcomed, but not the <A tag: Instead, use the link box to link to another page. A tutorial is available Members can login to post directly, become page editors, and be credited for their posts.

Link? Put it here: 
if you want a response, please enter your email address: 
Attn spammers: All posts are reviewed before being made visible to anyone other than the poster.
Did you find what you needed?


Welcome to!


Welcome to!