Compartir a través de


onscriptcommand Event (deprecated)

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(event);" >
Event Property object.onscriptcommand = handler;
attachEvent object.attachEvent( "onscriptcommand", handler);
Named script <SCRIPT FOR = object EVENT = onscriptcommand>

Event Information

Bubbles No
Cancels No
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.

Event Object Properties

Although event handlers in the DHTML Object Model do not receive parameters directly, a handler can query the event object for the following event properties.

Available Properties

srcElement Gets or sets the object that fired the event.
type Gets or sets the event name from the event object.

Refer to the specific event object for additional event 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.

Applies To

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

See Also

Introduction to HTML+TIME