User Guide

getNthFileNameInFolder() 337
Example
The following statement stores the normalized value of the vector MyVec in the variable Norm.
The value of Norm is vector (-0.1199, 0.9928, 0.0000) and the magnitude of Norm is 1.
MyVec = vector(-209.9019, 1737.5126, 0.0000)
Norm = MyVec.getNormalized()
put Norm
-- vector( -0.1199, 0.9928, 0.0000 )
put Norm.magnitude
-- 1.0000
See also
normalize
getNthFileNameInFolder()
Usage
getNthFileNameInFolder(folderPath, fileNumber)
Description
Movie method; 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 doesnt 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 Player.
Parameters
folderPath
Required. Specifies the path to the folder that contains the file.
fileNumber Required. Specifies the index position of the file in the folder.
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), Movie