EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 765

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING
1130 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
fileName (Cast) 765
Example
This statement displays the pathname and filename of the Buttons external cast in the
Message window:
-- Lingo syntax
trace(castLib("Buttons").fileName)
// JavaScript syntax
trace(castLib("Buttons").fileName);
This statement sets the filename of the Buttons external cast to Content.cst:
-- Lingo syntax
castLib("Buttons").fileName = _movie.path & "Content.cst"
// JavaScript syntax
castLib("Buttons").fileName = _movie.path + "Content.cst";
The movie then uses the external cast file Content.cst as the Buttons cast.
These statements download an external cast from a URL to the Director application folder and
then make that file the external cast named Cast of Thousands:
-- Lingo syntax
downloadNetThing("http://wwwcbDeMille.com/Thousands.cst", \
_player.applicationPath & "Thousands.cst")
castLib("Cast of Thousands").fileName = _player.applicationPath & \
"Thousands.cst"
// JavaScript syntax
downloadNetThing("http://wwwcbDeMille.com/Thousands.cst",
_player.applicationPath + "Thousands.cst");
castLib("Cast of Thousands").fileName = _player.applicationPath +
"Thousands.cst";
See also
Cast Library, downloadNetThing, preloadNetThing()