View comments | RSS feed

path (Movie)

Usage

-- Lingo syntax
_movie.path

// JavaScript syntax
_movie.path;

Description

Movie property; indicates the pathname of the folder in which the current movie is located. Read-only.

For pathnames that work on both Windows and Macintosh computers, use the @ pathname operator.

To see an example of path used in a completed movie, see the Read and Write Text movie in the Learning/Lingo Examples folder inside the Director application folder.

Example

This statement displays the pathname for the folder containing the current movie:

-- Lingo syntax
trace(_movie.path)

// JavaScript syntax
trace(_movie.path);

This statement plays the sound file Crash.aif stored in the Sounds subfolder of the current movie's folder:

-- Lingo syntax
sound(1).playFile(_movie.path & "Sounds\Crash.aif")

// JavaScript syntax
sound(1).playFile(_movie.path + "Sounds\\Crash.aif");

See also

Movie


Comments


Thomas Higgins said on Jun 22, 2005 at 10:56 AM :
Please note that when running in safe player mode (Shockwave is always in safe player mode, in authoring and projectors this can be enabled via the safePlayer property) you can use 'the moviePath' or '_movie.path' directly or assign it to a variable, but you cannot display the path itself, any attempts to do so will only result in an empty string. This is a security limitation that only prevents displaying the movie's path in that environment, but as I said it's still fully functional for path building and capable of being assigned to a variable. This behavior has been in the player for years but never yet clearly documented.

 

RSS feed | Send me an e-mail when comments are added to this page | Comment Report

Current page: http://livedocs.adobe.com/director/mx2004/release_update_en/09_pr464.htm