Inserting script commands
Using Windows Media File Editor, you can insert into your Windows Media file. You can insert any script type and value. A player will automatically process the following types of script commands:
- URL. If you insert the URL script command, a Web page will open when the file is played at the time you specify. If the file is rendered in a player that is embedded within a browser, the requested URL replaces the player, and users cannot view the rest of the file. You can get around this either by displaying the requested URL in a separate frame in the same browser instance or by opening an additional instance of the browser.
- Text. If you create a TEXT script command, you can insert text strings that will appear in the Player along with your encoded content. For the captions to be visible, users must have enabled captions in their player.
- Custom. You can insert custom script commands such as FILENAME, EVENT, and OPENEVENT (or any other script type and value). Use the FILENAME command to open a specific digital media file at the time you specify. The EVENT and OPENEVENT script commands can be used, for example, to insert an advertisement during playback. The OPENEVENT command precedes the actual EVENT. The OPENEVENT command allows the Player to prebuffer the content so that when the specified event occurs, the switch appears to be seamless. Note that the code for the specified event must be defined in the in order for the player to perform the specified event.
For detailed information about the script commands supported by Windows Media Player, see the Windows Media Player Software Development Kit (SDK). For information about script commands supported by Windows Media server, see the Windows Media Services SDK.
To insert a script command, you specify the type of command, the time at which you want the command to occur, and the parameter for the command. To insert a custom script command, type the script type and value in the Script Command Properties dialog box.
Script commands that you insert are displayed along the script command bar. You can drag a script command to a different time location. To edit or remove a script command, double-click the script command indicator.

Note
- For playback on Windows Media Player 9 Series, users must first enable script commands to be invoked.
Related topics
© 2000-2002 Microsoft Corporation. All rights reserved.