onscriptcommand Event(deprecated) (t:AUDIO, t:IMG, t:MEDIA, ...)

HTML (DHTML)

onscriptcommand Event?deprecated)

Internet Development Index

This page documents a feature of HTML+TIME 1.0, which was released in Microsoft?Internet Explorer 5. We recommend that you migrate your content to the latest version of HTML+TIME, which implements the SMIL 2.0 Working Draft. See the Introduction to HTML+TIME overview for more information.

Fires when the Microsoft?Windows Media?Player control receives a synchronized command or URL.

Syntax

Inline HTML<ELEMENT onscriptcommand = "handler" ... > All platforms
Event propertyobject.onscriptcommand = handlerJScript only
object.onscriptcommand = GetRef("handler")Visual Basic Scripting Edition (VBScript) 5.0 or later only
Named script <SCRIPT FOR = object EVENT = onscriptcommand> Internet Explorer only

Event Information

BubblesNo
CancelsNo
To invoke Open a document in the browser that plays a streaming media file affected by HTML+TIME. The streaming media file (.asf) must contain embedded commands, or triggers, in the stream.
Default action Calls the associated event handler.

Available Properties

Available Properties

Remarks

This event is deprecated.

This event fires when the Windows Media Player is used with one of the HTML+TIME media elements, including t:AUDIO, t:IMG, t:MEDIA, and t:VIDEO.

Commands can be embedded among the sounds and images of an .asf file. A command consists of a pair of Unicode strings associated with a designated time in the stream. When the stream reaches the time associated with the command, the Windows Media Player control fires this event and sets two properties on the event object, the scType property and the Param property. The scType property specifies the type of command, and the Param property specifies the command value. The scType property determines how the Windows Media Player control processes the command parameter.

Any type of command can be embedded in an ASF stream to be handled by this event. For example, if the Windows Media Player encounters a URL trigger in the .asf file, the scType property is set to URL and the Param property is set to URL (http://...).

In addition to the onscriptcommand event, a second event is fired in response to the .asf trigger. The event prefix on is added to the front of the string specified in the scType property, and that event is fired. For example, suppose a stream defines a trigger with the scType property set to the string mytype. In this case, the custom onmytype event fires at that point in the stream with the onscriptcommand.

Standards Information

This event is defined in HTML+TIME (Timed Interactive Multimedia Extensions) Non-Microsoft link.

Applies To

t:AUDIO, t:IMG, t:MEDIA, t:VIDEO

See Also

Introduction to HTML+TIME