Event

An event is script command embedded in a stream sent to the client that consists of a double string. The first string is the word event (this is case-sensitive), and the second string is the event name. The event name in the second string must match the event name defined in the ASX file. The two are case-sensitive to each other. Events can be sent to a client receiving a real-time stream, or can be saved in a .asf file that gets delivered as an on-demand unicast stream. When the script command is received, the client processes the Event.

The Event element defines a scope of Entry and/or EntryRef elements that play whenever the script command including the named event is received by the player. This allows the author to specify a behavior for stream switching in near real-time, as opposed to pre-authored stream changes using references to other pieces of content or ASX files. The following example demonstrates using the Event element in an ASX file to deliver advertisements to the client without disconnecting the user from the content being viewed. The author also can define what action the client takes after playing the stream defined in the Event element.

© 1996-1998 Microsoft Corporation. All rights reserved.