Lingo Dictionary > D-F > fileName (cast member property) |
![]() ![]() ![]() |
fileName (cast member property)
Syntax
member(
whichCastMember
).fileName
the fileName of member
whichCastMember
Description
Cast member property; refers to the name of the file assigned to the linked cast member specified by whichCastMember
. This property is useful for switching the external linked file assigned to a cast member while a movie plays, similar to the way you can switch cast members in a sprite. When the linked file is in a different folder than the movie, you must include the file's pathname.
You can also make unlinked media linked by setting the filename of those types of members that support linked media.
The fileName
member property accepts URLs as a reference. However, to use a file from a URL and minimize download time, use the downloadNetThing
or preloadNetThing
command to download the file to a local disk first and then set fileName
member property to the file on the local disk.
The Director player for Java doesn't support the downLoadNetThing
command, so the player can't download files in the background before assigning a new file to a cast member. Changing the fileName
member property in a movie playing as an applet can make the applet wait for the new file to download.
This property can be tested and set. After the file name is set, Director uses that file the next time the cast member is used. It is recommended that the new file be of the same type (that is, text, graphic, and so on) as the original file linked to the cast member. Changing the type of file linked to a cast member can have unpredictable results.
Example
This statement links the QuickTime movie "ChairAnimation" to cast member 40:
member(40).fileName = "ChairAnimation"
These statements download an external file from a URL to the Director application folder and make that file the media for the sound cast member Norma Desmond Speaks:
downLoadNetThing("http://www.cbDeMille.com/ Talkies.AIF",the \ applicationPath&"Talkies.AIF") member("Norma Desmond Speaks").fileName = the applicationPath & "Talkies.AIF"
See also
downloadNetThing
, preloadNetThing()
![]() ![]() ![]() |