QuickTime Developer Series

Sample Chapter


| Next | Prev | Top |

Adding URL Links to Movies

You can embed links to various URLs inside a movie using Plug-in Helper. This makes the links independent of any HTML, so multiple movies specified by a single <EMBED> tag can each have their own links. The links travel with the movie, even if someone "borrows" the movie for their own website.

This also allows you to create links that work when a movie is playing in QuickTime Player. QuickTime Player can be told to load the URL itself, without going through a browser, or it can open the URL in a browser window, launching the browser if necessary.

The URL can specify a movie, a Web page, or some other file. It can be targeted to load in a window or frame of the browser, to replace the current movie, or to load in QuickTime Player.

There are three areas in the Plug-in Helper window where you can add URLs: the Plugin Settings text box, the Movie URL text box, or the Track URL text box. Each has a slightly different behavior.

Plugin Settings Text Box

Adding a URL to the Plugin Settings text box causes the URL to load when someone clicks the display area of the movie, as long as the movie is loaded in the QuickTime browser plug-in. You add a URL in the Plugin Settings box using this syntax:

HREF="< Url > T<Target>"

The specified URL can be relative or absolute. If you use a relative URL, it must be relative to the movie , not relative to the Web page the movie is embedded in.

The T< Target > parameter is optional. If no target is specified, the URL loads in the current browser window or frame, replacing the current movie and any Web page it's embedded in.

If a target is specified, it can be a browser window, a frame, or the special values quicktimeplayer or myself . If the window or frame specified doesn't exist, a new browser window of that name is created. If the target is myself , the URL replaces the current movie inside the plug-in, leaving the surrounding Web page in place.

The URL loads when someone clicks in the display area of the movie. This could be the display area of any video track, sprite track, or text track. It doesn't work with audio-only movies, however, and clicking the movie controller doesn't load the URL either.

If you also specify AUTOHREF="True" in the Plugin Settings box, the URL loads immediately, without playing the current movie or waiting for a mouse click.

Starting with QuickTime 5, it's also possible to assign plug-in parameters to a movie as part of the movie's URL. Settings made as part of the URL override any settings made in Plug-in Helper, unless AllowEmbedTagOverrides is set True . For details, see Passing Plug-in Data in URLs.

Movie URL Text Box

Adding a URL to the Movie URL text box causes the URL to load when someone clicks the display area of the movie, whether the movie is loaded in the QuickTime browser plug-in or QuickTime Player.

The syntax for adding a URL in the Movie URL text box is different from the Plugin Settings text box. Enter just the URL--don't include an HREF= string. For example, enter

http://www.server.com/path/filename

not

HREF="http://www.server.com/path/filename"

If you specify a target for the URL, you need to use angle brackets and quotes:

" < http://www.server.com/path/filename> T<myself>"

The URL loads when someone clicks in the display area of the movie. This could be the display area of any video track, sprite track, or text track. It doesn't work with audio-only movies, and clicking the movie controller doesn't load the URL.

Adding a URL in the Movie URL text box creates a link that works both in the QuickTime plug-in and QuickTime Player, but the target parameter may be resolved differently. QuickTime Player's default target is itself, but if you link to a Web page, QuickTime Player will direct it to the default browser window, opening the default browser if necessary. The QuickTime plug-in's default target is the browser window or frame that contains the plug-in.

For details, see QuickTime and URLs.

Track URL Text Box

A track URL is similar to a movie URL, but you can enter a different track URL for every video track in the movie, whereas you can have only one movie URL.

The syntax for a track URL is the same as for a movie URL. It's just that the track URL is activated when someone clicks inside the display area of a particular video track, rather than anywhere in the movie. The video tracks appear by name in a scrolling list--click one to associate a URL with it, then enter the URL.

Since tracks can be arranged in time and space, this lets you activate a different URL depending on where or when the user clicks. Track URLs work only with video tracks, not with sprite or text tracks.

The QuickTime plug-in and QuickTime Player respond to track URLs just as they do to a movie URL.

    Important  You can't combine track URLs with a movie URL. Choose one or the other. If you specify both, the movie URL takes precedence, and any track URLs are ignored.


| Next | Prev | Top |
Copyright 2002 by Academic Press


Home | Updates | Corrections | FAQ | Table of Contents | Sample Chapter