Player.CurrentItemChange event

The CurrentItemChange event occurs when Controls.currentItem changes.

Syntax


Player.CurrentItemChange()

Parameters

This event has no parameters.

Return value

This event does not return a value.

Examples

The following JScript example demonstrates an event handler for the Player.currentItemChange event. The Player object was created with ID = "Player".



<!-- Create an HTML text box to display the media item name. -->
<INPUT TYPE="TEXT" NAME="MEDIA">

<!-- Create an event handler. -->
<SCRIPT LANGUAGE = "JScript"  FOR = Player EVENT = currentItemChange()>

   // Display the name of the new media item.
   MEDIA.value = Player.currentMedia.name;

</SCRIPT>


Requirements

Version

Windows Media Player version 7.0 or later.

DLL

Wmp.dll

See also

Controls.currentItem
Player Object

 

 

Show: