Goal: To use the URL event in ASF file to flip URLs into your default browser.
ASF and the Windows Media Player have the ability to send URLs to the browser. This demo will demonstrate how to send URL flips to a browser from the standalone player.
The BASE element in the ASX file needs to have a fully qualified URL. Code to Include Link to Streaming Content
Since we're doing this in the external player, we're going to use an ASX file to play the content.
First, open up the ASF Indexer -- the default location of this tool is Start -> Programs -> Windows Media -> ASF Indexer. Once it is running, select File -> Open. This will bring up a dialog box which will allow you to specify a piece of ASF content. Click on the "Edit Script Commands" button. This will bring up the "Script Commands" dialog box. Click on "New." Choose a time for you script command (in hours:minutes:seconds.tenths format) and leave the "type" of script command as "URL."
The parameter field is where you reference your HTML (or image) file in the following format: your-file.extensionandandFrame-name, where your-file.extension is the name of you file. Frame-name will allow you to specify a name for your frame. In our example, we'll be using leftFrame (capitalization counts). When you're done, click on "OK."
Your ASF Indexer should look something like this:
Repeat this process for all of your URL events, click on "OK," and then File -> Save. You have now created script commands in your ASF file.
This code will work with Internet Explorer 4+, and Netscape Navigator 4+ on platforms that support the Windows Media Player plug-in and ActiveX control.