270
getNthFileNameInFolder()
Syntax
getNthFileNameInFolder(
folderPath
,
fileNumber
)
Description
Function; returns a filename from the directory folder based on the specified path and number
within the folder. To be found by the
getNthFileNameInFolder
function, Director movies must
be set to visible in the folder structure. (On the Macintosh, other types of files are found whether
they are visible or invisible.) If this function returns an empty string, you have specified a number
greater than the number of files in the folder.
The
getNthFileNameInFolder
function doesn’t work with URLs.
To specify other folder names, use the
@ pathname
operator or the full path defined in the format
for the specific platform on which the movie is running. For example:
•
In Windows, use a directory path such as C:/Director/Movies.
•
On the Macintosh, use a pathname such as HardDisk:Director:Movies
.
To look for files on the
Macintosh desktop, use the path HardDisk:Desktop Folder
•
This function is not available in Shockwave.
Example
The following handler returns a list of filenames in the folder on the current path. To call the
function, use parentheses, as in
put currentFolder()
.
on currentFolder
fileList = [ ]
repeat with i = 1 to 100
n = getNthFileNameInFolder(the moviePath, i)
if n = EMPTY then exit repeat
fileList.append(n)
end repeat
return fileList
end currentFolder
See also
@ (pathname)
getOne()
Syntax
list.getOne(
value
)
getOne(
list
,
value
)
Description
List function; identifies the position (linear list) or property (property list) associated with the
value specified by
value
in the list specified by
list
.
For values contained in the list more than once, only the first occurrence is displayed. The
getOne
command returns the result 0 when the specified value is not in the list.
When used with linear lists, the
getOne
command performs the same functions as the
getPos
command.
Содержание DIRECTOR MX-LINGO DICTIONARY
Страница 1: ...Lingo Dictionary Macromedia Director MX...
Страница 756: ...Index 756...