User Guide

102 Chapter 5: Director Core Objects
Property summary for the Cast Library object
See also
castLib, castLib(), Member, Movie, Player, Sprite, Window
Global
Provides a location to store and access global variables. These variables are available to both Lingo
and JavaScript syntax.
You can access the Global object by using the top level
_global property. You can either assign
_global to a variable, or use the _global property directly to access the Global object’s methods
and any defined global variables.
Assign _global to a variable.
-- Lingo syntax
objGlobal = _global
// JavaScript syntax
var objGlobal = _global;
Use the _global property directly.
-- Lingo syntax
_global.showGlobals()
// JavaScript syntax
_global.showGlobals();
Access a global variable.
-- Lingo syntax
global gSuccess
on mouseDown
gSuccess = "Congratulations!"
put(gSuccess) -- displays "Congratulations!"
end
// JavaScript syntax
_global.gSuccess = "Congratulations!";
function mouseDown() {
trace(_global.gSuccess); // displays "Congratulations!"
}
Property
fileName (Cast)
member (Cast)
name
number (Cast)
preLoadMode
selection