Enables audio rollover effects for the object.
Syntax
XML <Prefix:CustomTag ID=sID STYLE="behavior:url('soundrollover.htc')" /> HTML <ELEMENT STYLE="behavior:url('soundrollover.htc')" ID=sID> Scripting object.style.behavior = "url('soundrollover.htc')" object.addBehavior ("soundrollover.htc")
Possible Values
Prefix Prefix used to associate CustomTag with a namespace. This prefix is set using the XMLNS attribute of the HTML element. CustomTag User-defined tag. sID String that uniquely identifies the object.
Members
Remarks
The behavior-defined members listed in the preceding table are not accessible through script until the window.onload event fires. Waiting for this event to fire ensures that the page is completely loaded, that all behaviors have been applied to corresponding elements on the page, and, consequently, that all the behavior's properties, methods, and events are available for scripting. Attempting to use any of the behavior-defined members will result in a scripting error indicating that the object does not support that particular member.
The soundRollover behavior allows Web authors to specify an audio source to be played when the mouse cursor hovers over an element, or when the element is clicked. Use the HOVERSOUND and PRESSEDSOUND attributes to specify the image sources for the events.
The soundrollover.htc file can be downloaded from the soundRollover sample page.
Example
This sample demonstrates the implementation of the soundRollover behavior.
Sample Code
<STYLE> .soundrollover { behavior : url(soundrollover.htc) } </STYLE> <DIV CLASS = "soundrollover" HOVERSOUND = "whoosh.wav" PRESSEDSOUND = "chitty.wav" > Audio rollover effect. </DIV>
Applies To
A, ACRONYM, ADDRESS, APPLET, AREA, B, BASE, BASEFONT, BDO, BGSOUND, BIG, BLOCKQUOTE, BODY, BR, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, COMMENT, DD, DEL, DFN, DIR, DIV, DL, DT, EM, EMBED, FIELDSET, FONT, FORM, FRAME, FRAMESET, HEAD, Hn, HR, HTML, I, IFRAME, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=hidden, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, INS, ISINDEX, KBD, LABEL, LEGEND, LI, LINK, LISTING, MAP, MARQUEE, MENU, NEXTID, NOBR, NOFRAMES, NOSCRIPT, OBJECT, OL, OPTION, P, PLAINTEXT, PRE, Q, RT, RUBY, S, SAMP, SCRIPT, SELECT, SMALL, SPAN, STRIKE, STRONG, styleSheet, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TITLE, TR, TT, U, UL, VAR, WBR, XMP