EVENT (ASX Element)

Windows Mobile 6.5
A version of this page is also available for
4/8/2010

This element defines a behavior or action taken by the Windows Media Player control when it receives a script command labeled as an event.


<EVENT
    NAME="text string"
    WHENDONE= "RESUME" | "NEXT" | "BREAK"
>
</EVENT

NAME(required)

The value of the event as created in Windows Media Author.

WHENDONE (required)

Value that defines what the WMP control does after playing the referenced content.

The following values are possible.

Value Description

RESUME

The WMP control resumes playing the current entry.

NEXT

The WMP control plays the next entry.

BREAK

Ends a REPEAT loop as if the repeat count had been completed.

See Remarks for more information.

Hierarchy Allowed element

Parent elements

ASX

Child elements

ENTRY, ENTRYREF

This element defines a behavior or action taken by the Microsoft WMP control when it receives a script command labeled as an event.

An event is a particular type of script command embedded in a stream sent to the WMP control that consists of a double string. The first string is the word event, and the second string is the event name.

The event name in the second string must match the event name defined in the Advanced Stream Redirector (ASX) file. (The match is not case-sensitive.)

Events can be sent to a WMP control receiving a real-time stream, or can be saved in an .asf file that gets delivered as an on-demand unicast stream. When the WMP control receives the script command, it processes the event as defined by the EVENT element.

This element defines a scope of ENTRY or ENTRYREF elements, script commands, or ASP pages that are processed whenever the WMP control receives the script command with the named event.

With this element, you can 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.

This element can appear anywhere within the ASX element. If multiple EVENT elements within an ASX element have identical values for their NAME attributes, the WMP control uses the first occurrence within the ASX element, and ignores all others. When EVENT elements have distinct NAME attributes, their order within the ASXelement does not matter.

The WMP control discards events it receives while processing another event. Nesting of events is not supported.

The value of the WHENDONE parameter defines what occurs after the referenced event content finishes playing, as follows:

  • RESUME: The current entry (the clip interrupted by the event) resumes playing. If the content is stored content, it resumes at the same point where it stopped; if the content is broadcast, it resumes at the current position.
  • NEXT: The next ENTRY element plays as if the event had not occurred and the WMP control had reached the end of the current clip.
  • BREAK: If the current entry is within a REPEAT loop, the loop terminates as if the repeat count had been completed. Otherwise, the WMP control jumps to the end of the playlist as if the final entry had completed as usual.
<ASX VERSION="3.0">
<ENTRY CLIENTSKIP="NO">
   <REF HREF="http://example.microsoft.com/clip1.asf" />
</ENTRY>

<EVENT NAME="Adlink" WHENDONE="RESUME">
   <ENTRYREF HREF="http://example.microsoft.com/adlink" CLIENTSKIP="NO" />
</EVENT>
</ASX>

Community Additions

Show: