EasyManua.ls Logo

MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING - Page 767

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 (Window) 767
fileName (Window)
Usage
-- Lingo syntax
windowObjRef.fileName
// JavaScript syntax
windowObjRef.fileName;
Description
Window property; refers to the filename of the movie assigned to a window. Read/write.
When the linked file is in a different folder than the movie, you must include the file’s pathname.
To be able to play the movie in a window, you must set the
fileName property to the movie’s
filename.
The
fileName property accepts URLs as a reference. However, to use a movie file from a URL
and minimize the download time, use the
downloadNetThing() or preloadNetThing()
methods to download the movie file to a local disk first and then set
fileName property to the file
on the local disk.
Example
This statement assigns the file named Control Panel to the window named Tool Box:
-- Lingo syntax
window("Tool Box").fileName = "Control Panel"
// JavaScript syntax
window("Tool Box").fileName = "Control Panel";
This statement displays the filename of the file assigned to the window named Navigator:
-- Lingo syntax
trace(window("Navigator").fileName)
// JavaScript syntax
trace(window("Navigator").fileName);
These statements download a movie file from a URL to the Director application folder and then
assign that file to the window named My Close Up:
-- Lingo syntax
downLoadNetThing("http://www.cbDeMille.com/Finale.DIR", \
_player.applicationPath & "Finale.DIR")
window("My Close Up").fileName = _player.applicationPath & "Finale.DIR"
// JavaScript syntax
downLoadNetThing("http://www.cbDeMille.com/Finale.DIR",
_player.applicationPath + "Finale.DIR");
window("My Close Up").fileName = _player.applicationPath + "Finale.DIR";
See also
downloadNetThing, preloadNetThing(), Window