A hypertext reference track, or HREF track, is a text track in which some or all of the samples contain hypertext links, in the form of URLs. (Actually, there’s no requirement that any of the samples in an HREF track contain a hypertext link, but then of course it’s not very useful.) These URLs can be any kind of URL supported by QuickTime, including HTTP, HTTPS, FTP, file, RTSP, and JavaScript URLs. Indeed, if the QuickTime plug–in finds a URL it doesn’t recognize, it passes it to the web browser for processing.
The QTPlgNewHREFTrack class lets you add a hypertext reference track to a movie.
→
The QTPlgNewHREFTrack class constructors are called when you create a new instance of the class, while the ˜QTPlgNewHREFTrack class destructor, is called automatically when the class is no more in use. Also, you can invoke the class destructor by setting the instance of the class to nil.
Once a new class instance is returned, it is good practice to check the class property to be sure that the new object can be used. See the validity conditions for more details.
The class provides you with the following initializer methods:
(m as ,
params as ,
trackBox as )
use this constructor to create a hypertext reference track and add it to the movie specified by the m ; if the
movie specified has been created in memory (see the
of the
class),
the text samples added to the track reside in memory as well. You specify the characteristics of the text samples to be
added to the track by setting the
of the
params object as appropriate. You specify the text track bounds by using the
trackBox parameter; if you set this parameter to nil, the track bounds are set
to the ,
if applicable; if any temptative to assign valid bounds to the track fail, the resulting class instance will be
(sample as string, duration as integer,
[automaticLink as boolean=true])
use this function to add a linked text (specified by the sample parameter) to the track; the text will be stored
using the MacRoman encoding scheme. The characteristics of the sample text are determined by the properties of the
you have passed to the .
Use the duration parameter to determine the duration of the text sample you are adding to the track.
Finally, the optional automaticLink parameter determines the behaviour of the QuickTime’s web browser
plug–in: if it is set to true (the default value), the plug–in
will load the specified URL automatically when that text sample becomes active, otherwise the plug–in will load the specified URL
in the frame containing the movie when the user clicks in the movie box while that text sample is active