searchPathList

Usage

-- Lingo syntax
_player.searchPathList

// JavaScript syntax
_player.searchPathList;

Description

Player property; a list of paths that Director searches when trying to find linked media such as digital video, GIFs, bitmaps, or sound files. Read/write.

Each item in the list of paths is a fully qualified pathname as it appears on the current platform at runtime.

The value of searchPathList is a linear list that you can manipulate the same as any other list by using commands such as add(), addAt(), append(), deleteAt(), and setAt(). The default value is an empty list.

URLs should not be used as file references in the search paths.

Adding a large number of paths to searchPaths slows searching. Try to minimize the number of paths in the list.

Note: This property will function on all subsequent movies after being set. Because the current movie's assets have already been loaded, changing the setting will not affect any of these assets.

Example

This statement displays the paths that Director searches when resolving filenames:

-- Lingo syntax
trace(_player.searchPathList)

// JavaScript syntax
trace(_player.searchPathList);

The following statement assigns two folders to searchPaths in Windows:

-- Lingo syntax
_player.searchPathList = ["C:\Director\Projects\", "D:\CDROM\Sources\"]

// JavaScript syntax
_player.searchPathList = list("C:\\Director\\Projects\\",
"D:\\CDROM\\Sources\\");

The following statement assigns two folders to searchPaths on a Macintosh:

-- Lingo syntax
_player.searchPathList = ["Hard Drive:Director:Projects:", "CDROM:Sources:"]

// JavaScript syntax
_player.searchPathList = list("Hard Drive:Director:Projects:",
"CDROM:Sources:");

See also

Player, searchCurrentFolder