User Guide

setVariable() 539
trueOrFalse Required. Specifies whether the track in the digital video is enabled (TRUE) or
not (
FALSE).
Example
This statement enables track 3 of the digital video assigned to sprite channel 8:
-- Lingo syntax
sprite(8).setTrackEnabled(3, TRUE)
// JavaScript syntax
sprite(8).setTrackEnabled(3, 1);
See also
trackEnabled
setVariable()
Usage
-- Lingo syntax
spriteObjRef.setVariable(variableName, newValue)
// JavaScript syntax
spriteObjRef.setVariable(variableName, newValue);
Description
Function; sets the value of the given variable in the given Flash sprite. Flash variables were
introduced in Flash version 4.
Parameters
variableName
Required. Specifies the name of the variable.
newValue Required. Specifies the new value of the variable.
Example
The following statement sets the value of the variable currentURL in the Flash cast member in
sprite 3. The new value of currentURL will be “http://www.macromedia.com/software/flash/”.
-- Lingo syntax
sprite(3).setVariable("currentURL", \
"http://www.macromedia.com/software/flash/")
// JavaScript syntax
sprite(3).setVariable("currentURL",
"http://www.macromedia.com/software/flash/");
See also
hitTest(), getVariable()