Scripting Reference

The QuickTime Xtra provides the following new properties and functions to control QuickTime sprite icons and sprites.

| center
Syntax | `SetIconProperty(IconID@"IconTitle"``, #``center,``state)`
    GetIconProperty(IconID@"IconTitle", #center)
Type | Icon property
Description | The `center` property has a visible effect only when the `crop` property is set to true. The `state` parameter can have these values: TRUE The QuickTime movie is cropped around the center of the movie. FALSE The QuickTime movie is cropped from the top left corner of the movie

The `center` property can be tested and set.

Example | This script sets the setting of the `center` property of a QuickTime movie named "QT3" to `TRUE`:
    SetIconProperty(@"QT3", #crop,TRUE) -- crop must be TRUE
    SetIconProperty(@"QT3", #center,TRUE)
Related Property | crop controller
Syntax | `SetIconProperty(IconID@"IconTitle", #controller, state)`
    GetIconProperty(IconID@"IconTitle", #controller)
Type | Icon property
Description | This property shows or hides a QuickTime sprite movie's controller. The `state` parameter can have these values: TRUE The QuickTime movie's controller is visible. FALSE The QuickTime movie's controller is hidden. The `controller` property can be tested and set. The QuickTime movie must be set to display direct to screen for the controller to be visible.

Example | This script reverses the current setting of the `controller` property of a QuickTime movie named "Starburst."
    state := GetIconProperty(IconID@"StarBurst", #controller)
    SetIconProperty(IconID@"StarBurst", #controller, ~state)
Related Property | `directToStage` crop
Syntax | `SetIconProperty(IconID@"IconTitle", #crop,state)`
    GetIconProperty(IconID@"IconTitle", #crop)
Type | Icon property
Description | This property affects how a QuickTime movie is displayed in the Presentation window. The `state` parameter can have these values: TRUE The QuickTime movie isn't scaled to fit the sprite. It's cropped to fit inside the sprite rectangle. FALSE The QuickTime movie is scaled—either stretched or shrunk—to fit the sprite

The `crop` property can be tested and set.

Example | This script sets the setting of the `crop` property of a QuickTime movie named "QT3" to `TRUE`:
    SetIconProperty(@"QT3", #crop,TRUE)
Related Property | center, scale, translation cuePointNames
Syntax | `GetIconProperty(IconID@"IconTitle", #cuePointNames)`
Type | Icon property
Description | This property returns a linear list of named cue points set in the QuickTime movie file. If there are no cue points in the file, the value returned is `[]`. Use SoundEdit to insert a cue point in a QuickTime file. SoundEdit uses the term "marker" to refer to the cue points.

Newly imported QuickTime movies have the `streaming` property set `TRUE` by default. This means that cue points will be unavailable until the `streaming` property is set to `FALSE`.

Related Property | mostRecentCuePoint cuePointTimes
Syntax | `GetIconProperty(IconID@"IconTitle", #cuePointTimes)`
Type | Icon property
Description | This property returns a linear list of cue point times (in milliseconds) set in the QuickTime movie file. If there are no cue points in the file, the value returned is `[]`. Use SoundEdit to insert a cue point in a QuickTime file. SoundEdit uses the term "marker" to refer to the cue points.

Newly imported QuickTime movies have the `streaming` property set `TRUE` by default. This means that cue points will be unavailable until the `streaming` property is set to `FALSE`.

Related Property | mostRecentCuePoint currentTime
Syntax | `GetSpriteProperty(IconID@"IconTitle", #currentTime)`
Type | Sprite property
Description | This property can be used to determine the time elapsed (in milliseconds) from the start of the specified QuickTime movie. The `currentTime` property can be tested but not set. digitalVideoType
Syntax | `GetIconProperty(IconID@"IconTitle", #digitalVideoType)`
Type | Icon property
Description | This property always returns `#quickTime`. directToStage
Syntax | `SetIconProperty(IconID@"IconTitle"``, #``directToStage,``state``)`
    GetIconProperty(IconID@"IconTitle", #directToStage)
Type | Icon property
Description | This property affects how a QuickTime movie is displayed in the Presentation window. The `state` parameter can have these values: TRUE The QuickTime movie plays in front of all other layers. No objects can appear in front of the movie except as a mask.

FALSE The QuickTime movie can appear in any layer in the Presentation window.

The `directToStage` property can be tested and set.

Example | This script sets the setting of the `directToStage` property of a QuickTime movie named "QT3" to `TRUE`:
    SetIconProperty(@"QT3", #directToStage,TRUE)
Related Property | `mask` duration
Syntax | `GetIconProperty(IconID@"IconTitle", #duration)`
Type | Icon property
Description | This property can be used to determine the QuickTime movie's duration in ticks (60ths of a second). The `duration` property can be tested but not set. filename
Syntax | `SetIconProperty(IconID@"IconTitle"``, #filename`,`file``)`
    GetIconProperty(IconID@"IconTitle", #filename)
Type | Icon property
Description | This property specifies the QuickTime movie file to display at the specified icon title. The `file` parameter can be an absolute path, a relative path, or a URL. The `filename` property can be tested and set.
Example | The following examples show three ways to specify the `filename` property:
    SetIconProperty(@"QT3", #filename, "sample.mov")
    SetIconProperty(@"QT3", #filename, "C:\qtvr_example.mov")
    SetIconProperty(@"QT3", #filename, ¬
    "http://www.apple.com/quicktime/samples/qtvrimages/saumur_multirate.mov")
frameRate
Syntax | `SetIconProperty(IconID@"IconTitle"``, #frameRate`,`rate``)`
    GetIconProperty(IconID@"IconTitle", #frameRate)
Type | Icon property
Description | This property specifies the frame rate at which the QuickTime movie at the specified sprite icon is played. The possible values for the `rate` parameter correspond to the playback options in the QuickTime Xtra Properties dialog box: -2 plays every frame as fast as possible

-1 plays every frame at the normal rate

0 plays the movie in sync with the soundtrack

A positive number plays the movie at that frame rate

The `frameRate` property can be tested and set.
invertMask

Syntax | `SetIconProperty(IconID@"IconTitle"``, #invertMask`,`state``)`
    GetIconProperty(IconID@"IconTitle", #invertMask)
Type | Icon property
Description | This property controls the way Authorware interprets a QuickTime movie's `mask` property. The `state` parameter can have these values: TRUE The QuickTime movie is drawn in the white pixels of the movie's mask. FALSE The QuickTime movie is drawn in the black pixels of the movie's mask.

The `invertMask` property can be tested and set. The default `state` value is `FALSE`.

Specify a mask icon using the `mask` icon property before setting `invertMask`. The QuickTime movie must be set to display direct to screen for `invertMask` to have an effect.

Example | This script reverses the current setting of the `invertMask` property of a QuickTime movie named "Starburst."
    state := GetIconProperty(IconID@"StarBurst", #invertMask)
    SetIconProperty(IconID@"StarBurst", #invertMask, ~state)
Related Property | `mask` isPastCuePoint
Syntax | `CallSprite(IconID@"IconTitle", #isPastCuePoint,` `cuePointID``)`
Type | Xtra function
Description | This function returns the number of times a sprite passes a specified cue point in its file. The `cuePointID` parameter may be an integer or a name. If `cuePointID` is a number, `isPastCuePoint` returns 1 if the cue point has passed and 0 if it hasn't been passed. For example, if `cuePointID` is 2, then `isPastCuePoint` will return 1 if the second cue point in the QuickTime movie has passed.

If `cuePointID` is a name, `isPastCuePoint` returns the number of cue points with that name that have passed.

If the value specified for `cuePointID` doesn't exist in the QuickTime movie, the function returns 0.

The number returned by `isPastCuePoint` is based on the absolute position of the sprite in the QuickTime movie. For example, if a movie passes cue point Main and then loops and passes Main again, `isPastCuePoint` returns 1 instead of 2.

When the result of `isPastCuePoint` is treated as a Boolean value, the function returns `TRUE` if any cue points identified by `cuePointID` have passed, and `FALSE` if no cue points are passed.

Use SoundEdit to insert a cue point in a QuickTime file. SoundEdit uses the term "marker" to refer to the cue points.

Newly imported QuickTime movies have the `streaming` property set `TRUE` by default. This means that cue points will be unavailable until the `streaming` property is set to `FALSE`.

Related Property | `cuePointNames`, `cuePointTimes` loop
Syntax | `SetIconProperty(IconID@"IconTitle"`, #`loop,` state)
    GetIconProperty(IconID@"IconTitle", #loop)
Type | Icon property
Description | This property determines whether the specified QuickTime movie is set to loop (`TRUE`) or not (`FALSE`).
Example | This script sets the QuickTime movie named "Starburst" to loop.
    SetIconProperty(IconID@"StarBurst", #loop, TRUE)
loopBounds
Syntax | `SetSpriteProperty(IconID@"IconTitle"`, #`loopBounds`, [`startTime, endTime`])
    GetSpriteProperty(IconID@"IconTitle", #loopBounds)
Type | Sprite property
Description | This property sets the internal loop points for a QuickTime sprite. The loop points are specified as a list:
    [startTime, endTime]
The `startTime` and `endTime` parameters must meet these requirements:

| Both parameters must be integers that specify times in ticks (60ths of a second).
| The values must range from 0 to the duration of the QuickTime movie.
| The starting time must be less than the ending time.

If any of these requirements is not met, the QuickTime movie loops through its entire duration.

The `loopBounds` property has no effect if the movie's `loop` property is set to `FALSE`. Authorware uses these rules to decide how to loop the movie:

| If the ending time specified by `loopBounds` is reached, the movie loops back to the starting time.
| If the end of the movie is reached, the movie loops back to the start of the movie.
| Authorware stops when it reaches the ending time specified by `loopBounds` or the end of the movie, whichever comes first.

The `loopBounds` property can be tested and set. The default is `[0,0]`.

Example | This sprite script sets the starting and ending times for looping within a QuickTime sprite. Notice that the times are set by specifying the number of seconds, which is then converted to ticks by multiplying by 60.
    SetSpriteProperty(@"QuickTimeIcon", #loopBounds,[(16 * 60),(32 * 60)])
mask
Syntax | `SetIconProperty(IconID@"IconTitle"`, #`mask`,`IconID@"IconTitle"`)
Type | Icon property
Description | This property specifies the black and white (1-bit) contents of a display or interaction icon to be used as a mask for QuickTime media rendered direct to screen. The QuickTime media appears in the areas where the mask's pixels are black. The `mask` property allows you to take advantage of the performance advantages of a direct to screen digital video while playing a QuickTime movie in a non-rectangular area. The `mask` property has no effect on non-direct to screen sprite icons.

Authorware always aligns the upper-left corner of the contents of the mask icon with the upper-left corner of the QuickTime movie sprite. The mask can't be moved and isn't affected by the `center` or `crop` properties of its associated icon.

For best results, set a QuickTime icon's `mask` property before any of its sprites appear in the Presentation window. Setting or changing the `mask` property while the sprite appears in the Presentation window can have unpredictable results (for example, the mask might appear as a "freeze frame" of the digital video at the moment the `mask` property took effect).

Masking is an advanced feature; you may need to do some experimentation to achieve your goal.

The `mask` property can be tested and set. To remove a mask, set the `mask` property to `0`.

Example | This script sets a mask for the QuickTime sprite icon named "Peeping Tom" before Authorware begins to draw the sprite.
    SetIconProperty(@"Peeping Tom", #mask, @"Keyhole")
Related Property | `directToStage, invertMask` mediaBusy
Syntax | GetSpriteProperty(IconID@"IconTitle", #`mediaBusy`)
Type | Sprite property
Description | This property returns `TRUE` if the specified QuickTime movie is currently playing. The `mediaBusy` property can be tested but not set. mediaReady
Syntax | GetIconProperty(IconID@"IconTitle", #`mediaReady`)
Type | Icon property
Description | This property returns `TRUE` if the specified QuickTime movie is downloaded and ready to play. The `mediaReady` property can be tested but not set. mostRecentCuePoint
Syntax | `GetSpriteProperty(IconID@"IconTitle", #mostRecentCuePoint)`
Type | Sprite property
Description | This property is the number that identifies the most recent cue point passed in the sprite icon. The value is the ordinal number of the cue point. If no cue points have been passed, the value is 0.
Related Property | `cuePointNames`, `cuePointTimes` mouseLevel
Syntax | `SetSpriteProperty(IconID@"IconTitle"`, #`mouseLevel`, `value`)
    GetSpriteProperty(IconID@"IconTitle", #mouseLevel)
Type | Sprite property
Description | This property controls how Authorware passes mouse clicks on a QuickTime sprite to QuickTime. Without the QuickTime Xtra, Authorware passes mouse clicks only on the QuickTime controller. The ability to pass mouse clicks within the sprite's bounding rectangle can be useful for interactive media such as QuickTime VR. The `value` parameter can have these values:

`#controller` passes clicks only on the movie controller. This is the standard behavior without the QuickTime Xtra.

`#all` passes all mouse clicks within the sprite's bounding rectangle.

`#none` passes no mouse clicks.

The `mouseLevel` property can be tested and set. The default value is `#controller`.

Example | This script checks to see if the name of the currently executing icon contains the string "QTVR." If it does, it sets the `mouseLevel` to `#all`; otherwise, it sets the `mouseLevel` to `#none`.
    if Find(" QTVR, IconTitle(ExecutingIconID)) then
            setSpriteProperty(ExecutingIconID, #mouseLevel, #all)
        else
            SetSpriteProperty(ExecutingIconID, #mouseLevel, #none)
    end if
mRate
Syntax | `SetSpriteProperty(IconID@"IconTitle"`, #`mRate`, `value`)
    GetSpriteProperty(IconID@"IconTitle", #mRate)
Type | Sprite property
Description | This property determines the rate of playback for the QuickTime movie playing in the specified icon. The `value` parameter can have these values: 1 is normal forward play -1 is reverse 0 is stop Higher and lower values are possible. For example, a value of 0.5 causes the digital video to play slower than normal. However, frames may be dropped when the value of `mRate` exceeds 1, depending on the performance of the computer the movie is playing on.

The `mRate` property can be tested and set.

Example | This script toggles forward and reverse playback for the specified QuickTime movie:
    if (GetSpriteProperty(@"QT3", #mRate)) = 1 then
            SetSpriteProperty(@"QT3", #mRate,-1)
        else
            SetSpriteProperty(@"QT3", #mRate,1)
    end if
mTime
Syntax | `SetSpriteProperty(IconID@"IconTitle"`, #`mTime`, `value`)
    GetSpriteProperty(IconID@"IconTitle", #mTime)
Type | Sprite property
Description | This property determines the current time of a QuickTime movie playing in the specified icon. The value of the `mTime` property is measured in ticks. The `mTime` property can be tested and set.
Example | This script restarts the QuickTime movie playing in the "QT3" icon:
    SetSpriteProperty(@"QT3", #mTime, 0)
pausedAtStart
Syntax | `SetIconProperty(IconID@"IconTitle"``, #``pausedAtStart,``state``)`
    GetIconProperty(IconID@"IconTitle", #pausedAtStart)
Type | Icon property
Description | This property specifies whether the Paused checkbox in the QuickTime Xtra Properties dialog box is checked or not. The `state` parameter can have these values: TRUE The Paused checkbox is checked. FALSE The Paused checkbox is not checked. The `pausedAtStart` property can be tested and set.

Example | This script sets the `pausedAtStart` property of a QuickTime movie named "QT3" to `TRUE`:
    SetIconProperty(@"QT3", #pausedAtStart,TRUE)
percentStreamed
Syntax | GetIconProperty(IconID@"IconTitle", #`percentStreamed`)
Type | Icon property
Description | This property returns a value between 1 and 100 to indicate how much of the QuickTime movie has been downloaded. The `percentStreamed` property can be tested but not set.
Related Property | `mediaReady` preload
Syntax | `SetIconProperty(IconID@"IconTitle"``, #``preload,``state``)`
    GetIconProperty(IconID@"IconTitle", #preload)
Type | Icon property
Description | This property specifies whether the Enable Preload checkbox in the QuickTime Xtra Properties dialog box is checked or not. The `state` parameter can have these values: TRUE The Enable Preload checkbox is checked. FALSE The Enable Preload checkbox is not checked.

The `preload` property can be tested and set.

Example | This script sets the `preload` property of a QuickTime movie named "QT3" to `TRUE`:
    SetIconProperty(@"QT3", #preload,TRUE)
QuickTimeVersion
Syntax | QuickTimeVersion()
Type | Function
Description | This function returns a floating-point value that identifies the currently installed version of QuickTime. Windows users: If there are multiple versions of QuickTime 3.0 or later installed, `QuickTimeVersion` returns the latest version. If a version before QuickTime 3.0 is installed, `QuickTimeVersion` returns 2.1.2 regardless of the version installed.

Example | This script uses `QuickTimeVersion` to check whether QuickTime is installed. If QuickTime version 3 or later is installed, Authorware jumps to a file containing a QuickTime video. If QuickTime isn't installed, Authorware jumps to a file that employs traditional Authorware animation.

    if QuickTimeVersion() >= 3 then
    	JumpFile "SplashVideo"
    else
    	JumpFile "SplashAnimated"
    end if

rotation

Syntax | `SetIconProperty(IconID@"IconTitle"`, #`rotation`, `degrees`) `GetIconProperty(IconID@"IconTitle", #rotation)`
Type | Icon property
Description | This property controls the rotation of a QuickTime sprite. This property does not rotate the sprite's bounding rectangle or the sprite's controller. Instead, it rotates the image around the image's center point within the sprite's bounding rectangle.

If the sprite's `crop` property is set to `TRUE`, rotating the sprite frequently moves part of the image out of the viewable area; when the sprite's `crop` property is set to `FALSE`, the image is scaled to fit within the bounding rectangle (which may cause image distortion).

You specify the rotation in the `degrees` parameter. The `rotation` property can be tested and set. The default value is 0.

Example | This script rotates a QuickTime sprite 180 degrees.
    SpriteRotation := GetIconProperty(IconID@"QuickTime", #rotation)

    SetIconProperty(IconID@"QuickTime", #rotation, SpriteRotation + 180)
scale
Syntax | `SetIconProperty(IconID@"IconTitle"`, #`scale`, [`xPercent``,` `yPercent`]) `GetIconProperty(IconID@"IconTitle", #scale)`
Type | Icon property
Description | This property controls the scaling of a QuickTime sprite. This property doesn't scale the sprite's bounding rectangle or the sprite's controller. Instead, it scales the image around the image's center point within the bounding rectangle. The scaling is specified as a list containing two percentages:

    [xPercent, yPercent]

The `xPercent` parameter specifies the amount of horizontal scaling; the `yPercent` parameter specifies vertical scaling.

When the sprite's `crop` property is set to `TRUE`, the `scale` property can be used to simulate zooming within the sprite's bounding rectangle. When the sprite's `crop` property is set to `FALSE`, the `scale` property is ignored.

The `scale` property can be tested and set. The default value is [100,100].

Example | This script zooms in on a QuickTime sprite.
    SetIconProperty(IconID@"QT3", #scale,[150,150])
setTrackEnabled
Syntax | `CallSprite(`IconID@"IconTitle"`, #setTrackEnabled,` `trackNum, state``)`
Type | Xtra function
Description | This function determines whether a QuickTime sprite's track is enabled to play. QuickTime version 3 or later supports multiple tracks for video, sound, text, and other media.
Example | This script toggles the first track in the sprite icon named "QT3."
    if (CallSprite(@"QT3", #trackEnabled,1) ) = 0 then
            CallSprite(@"QT3", #setTrackEnabled,1,TRUE)
        else
            CallSprite(@"QT3", #setTrackEnabled,1,FALSE)
    end if
sound
Syntax | `SetIconProperty(IconID@"IconTitle"``, #``sound,``state``)`
    GetIconProperty(IconID@"IconTitle", #sound)
Type | Icon property
Description | This property controls the audio output of the specified QuickTime sprite icon. The `state` parameter can have these values: TRUE The QuickTime movie's sound is turned on. FALSE The QuickTime movie's sound is turned off. The `sound` property can be tested and set.

Example | This script reverses the current setting of the `sound` property of a QuickTime movie named "Starburst."
    state := GetIconProperty(IconID@"StarBurst", #sound)
    SetIconProperty(IconID@"StarBurst", #sound, ~state)
streaming
Syntax | `SetIconProperty(IconID@"IconTitle"`, #`streaming,` state)
    GetIconProperty(IconID@"IconTitle", #streaming)
Description | QuickTime movies may now be streamed into Authorware. Set `streaming` to `TRUE` to enable this feature. This setting is `TRUE` by default in Authorware 5.1, but `FALSE` by default for any existing ( Authorware 5.0 and earlier ) QuickTime icons. Note: QuickTime 4 must be installed to enable `streaming`.

If a streaming QuickTime file contains cuepoints, then you must set the text track to be preloaded (use a QuickTime editor such as MoviePlayerPro to do this). If you do not preload the text track, Authorware will disable the cuepoints in the QuickTime file so it can stream without downloading the entire file. You will need to reload the file after editing the QuickTime movie to preload the cuepoint track.

Newly imported QuickTime movies have the `streaming` property set `TRUE` by default. This means that cue points will be unavailable until the `streaming` property is set to `FALSE`.

The `streaming` property can be tested and set.

Example | This script sets the QuickTime movie named "Starburst" to download completely before playing by setting the `streaming` property to `FALSE`.
    SetIconProperty(IconID@"StarBurst", #streaming, FALSE)
timeScale
Syntax | GetIconProperty(IconID@"IconTitle", #`timeScale`)
Type | Icon property
Description | This property gives the time unit per second that the QuickTime movie's frames are based on. For example, QuickTime video is measured in 1/600s of a second so the `timeScale` value is 600. The `timeScale` property can be tested but not set. trackCount

Syntax | `CallSprite(`IconID@"IconTitle"`, #trackCount)`
Type | Xtra function
Description | This function returns the number of tracks in the movie at the specified icon. QuickTime version 3 or later supports multiple tracks for video, sound, text, and other media.
Example | This script sets the value of the `NumTracks` variable to the number of tracks in the sprite icon named "QT3."
    NumTracks := CallSprite(@"QT3", #trackCount)
trackEnabled
Syntax | `CallSprite(`IconID@"IconTitle"`, #trackEnabled,` `trackNum``)`
Type | Xtra function
Description | This function indicates whether the specified track of a digital video is enabled to play. Use the `setTrackEnabled` function to enable or disable a track.

| When `trackEnabled` is `TRUE`, the specified track is enabled.
| When `trackEnabled` is `FALSE`, the specified track is disabled.

Example | This script toggles the first track in the sprite icon named "QT3."
    if (CallSprite(@"QT3", #trackEnabled,1) ) = 0 then
            CallSprite(@"QT3", #setTrackEnabled,1,TRUE)
        else
            CallSprite(@"QT3", #setTrackEnabled,1,FALSE)
    end if
trackNextKeyTime
Syntax | `CallSprite(IconID@"IconTitle"``, #``trackNextKeyTime,` `trackNum``)`
Type | Xtra function
Description | This function returns the time in ticks (60ths of a second) of the keyframe that follows the current time in the QuickTime movie. The movie's track is specified by `trackNum`. The returned value can be tested but not set. trackNextSampleTime
Syntax | `CallSprite(IconID@"IconTitle"``, #``trackNextSampleTime,` `trackNum``)`
Type | Xtra function
Description | This function returns the time in ticks (60ths of a second) of the next sample that follows the QuickTime movie's current time. It's useful for locating text tracks in a QuickTime movie. The returned value can be tested but not set. trackPreviousKeyTime

Syntax | `CallSprite(IconID@"IconTitle"``, #``trackPreviousKeyTime,` `trackNum``)`
Type | Xtra function
Description | This function returns the time in ticks (60ths of a second) of the prior keyframe that precedes the current time in the QuickTime movie. The movie's track is specified by `trackNum`. The returned value can be tested but not set. trackPreviousSampleTime

Syntax | `CallSprite(IconID@"IconTitle"``, #``trackPreviousSampleTime,` `trackNum``)`
Type | Xtra function
Description | This function returns the time in ticks (60ths of a second) of the sample that precedes the QuickTime movie's current time. It is useful for locating text tracks in a QuickTime movie. The returned value can be tested but not set. trackStartTime

Syntax | `CallSprite(`IconID@"IconTitle"`, #trackStartTime,``` `trackNum``)`
Type | Xtra function
Description | This function returns the start time of the specified track of the specified QuickTime movie in ticks (60ths of a second).
Example | This script sets the value of the `StartTime` variable to the default starting time of the second track in the sprite icon named "QT3."
    StartTime := CallSprite(@"QT3", #trackStartTime, 2)
trackStopTime
Syntax | `CallSprite(`IconID@"IconTitle"`, #trackStopTime,``` `trackNum``)`
Type | Xtra function
Description | This function returns the stop time of the specified track of the specified QuickTime movie in ticks (60ths of a second).
Example | This script sets the value of the `EndTime` variable to the default ending time of the second track in the sprite icon named "QT3."
    EndTime := CallSprite(@"QT3", #trackStopTime, 2)
trackType
Syntax | `CallSprite(`IconID@"IconTitle"`, #trackType,``` `trackNum``)`
Type | Xtra function
Description | This function returns a symbol to identify the type of the specified track in the movie at the specified icon. QuickTime version 3 or later supports multiple tracks for video, sound, text, and other media. Possible return values include`#video`, `#sound`, and `#text`.
Example | This script sets the value of the `SoundTrack` variable depending on the presence of sound in the second track of the sprite icon named "QT3."
    If CallSprite(@"QT3", #trackType, 2) = #sound then
            SoundTrack := "sound available"
        else
            SoundTrack := "no sound available"
    end if
trackText
Syntax | `CallSprite`(IconID@"IconTitle", #`trackText`, `trackNum`)
Type | Xtra function
Description | This function returns the text that is at the current time in the specified track of the QuickTime movie. The result is a string value, which can be up to 32K characters long. This function applies to text tracks only. translation
Syntax | `SetIconProperty(IconID@"IconTitle"`, #`translation`, [`xOffset``,` `yOffset`]) `GetIconProperty(IconID@"IconTitle", #translation)` `SetSpriteProperty(IconID@"IconTitle", #translation, [``xOffset``,` `yOffset``])` `GetSpriteProperty(IconID@"IconTitle", #translation)`

Type | Icon property Sprite property
Description | This property controls the offset of a QuickTime sprite's image within the sprite's bounding box. This offset is expressed in relation to the sprite's default location, as set by its `center` property. When `center` is set to `TRUE`, the sprite is offset relative to the center of the bounding rectangle; when `center` is set to `FALSE`, the sprite is offset relative to the upper-left corner of the bounding rectangle. The offset is set as a list:

    [xOffset, yOffset]

The `xOffset` parameter specifies the horizontal offset, in pixels, from the sprite's default location; the `yOffset` parameter specifies the vertical offset. You can specify offsets as positive or negative integers.

When the sprite's `crop` property is set to `TRUE`, the `translation` property can be used to mask portions of the QuickTime movie by moving them outside the bounding rectangle. When the `crop` property is set to `FALSE`, the `translation` property is ignored and the sprite is always positioned at the upper-left corner of the sprite's rectangle.

The `translation` property can be tested and set. The default is [0,0].

Example | This script assumes that the `center` property of a 320-pixel-wide QuickTime sprite is set to `FALSE`. It moves the movie's horizontal translation point to the right edge of the sprite by 10 pixels. This has a "wipe right" effect, moving the sprite out of view to the right each time the script executes.

    horizontalPosition := GetSpriteProperty(IconID@"QuickTime", #translation)
    if horizontalPosition < 320 then
    	SetSpriteProperty(IconID@"QuickTime", #translation, horizontalPosition + [10,0])
    end if

video

Syntax | `SetIconProperty(IconID@"IconTitle"``, #``video,``state``)`
    GetIconProperty(IconID@"IconTitle", #video)
Type | Icon property
Description | This property enables or disables the video output of the specified QuickTime sprite icon. The `state` parameter can have these values: TRUE The QuickTime movie's video is visible. FALSE The QuickTime movie's video is hidden. The `video` property can be tested and set.

Example | This script reverses the current setting of the `video` property of a QuickTime movie named "Starburst."
    state := GetIconProperty(IconID@"StarBurst", #video)
    SetIconProperty(IconID@"StarBurst", #video, ~state)
volumeLevel
Syntax | `SetSpriteProperty(IconID@"IconTitle"`, #`volumeLevel,``level`)
    GetSpriteProperty(IconID@"IconTitle", #volumeLevel)
Type | Sprite property
Description | This property controls the sound volume of a QuickTime sprite. You can set the sound level from 0 (mute) to 256 (full volume). The `volumeLevel` property can be tested and set.
Example | This script checks if the `volumeLevel` of the QuickTime sprite is greater than 200. If it is, the script sets the `volumeLevel` to 150.
    if GetSpriteProperty(IconID@"QuickTime", #volumeLevel) > 200 then
    	SetSpriteProperty(IconID@"QuickTime", #volumeLevel,150)
    end if