preLoad() (Movie)

Usage

-- Lingo syntax
_movie.preLoad({frameNameOrNum})
_movie.preLoad(fromFrameNameOrNum, toFrameNameOrNum)

// JavaScript syntax
_movie.preLoad({frameNameorNum});
_movie.preLoad(fromFrameNameOrNum, toFrameNameOrNum);

Description

Movie method; preloads cast members in the specified frame or range of frames into memory and stops when memory is full or when all of the specified cast members have been preloaded, as follows:

The preLoad() method also returns the number of the last frame successfully loaded. To obtain this value, use the result() method.

Parameters

frameNameOrNum Optional. A string that specifies the specific frame to preload, or an integer that specifies the number of the specific frame to preload.

fromFrameNameOrNum Required if preloading a range of frames. A string that specifies the name of the label of the first frame in the range of frames to preload, or an integer that specifies the number of the first frame in the range of frames to preload.

toFrameNameOrNum Required if preloading a range of frames. A string that specifies the name of the label of the last frame in the range of frames to preload, or an integer that specifies the number of the last frame in the range of frames to preload.

Example

This statement preloads the cast members used from the current frame to the frame that has the next marker:

-- Lingo syntax
_movie.preLoad(_movie.marker(1))

// JavaScript syntax
_movie.preLoad(_movie.marker(1));

This statement preloads the cast members used from frame 10 to frame 50:

-- Lingo syntax
_movie.preLoad(10, 50)

// JavaScript syntax
_movie.preLoad(10, 50);

See also

Movie, result