User Guide

488 Chapter 12: Methods
Parameters
None.
Example
This statement tells the computer to exit to the Windows desktop or Macintosh Finder when the
user presses Control+Q in Windows or Command+Q on the Macintosh:
-- Lingo syntax
if (_key.key = "q" and _key.commandDown) then
_player.quit()
end if
// JavaScript syntax
if (_key.key == "q" && _key.commandDown) {
_player.quit();
}
See also
Player
ramNeeded()
Usage
-- Lingo syntax
_movie.ramNeeded(intFromFrame, intToFrame)
// JavaScript syntax
_movie.ramNeeded(intFromFrame, intToFrame);
Description
Movie method; determines the memory needed, in bytes, to display a range of frames. For
example, you can test the size of frames containing 32-bit artwork: if
ramNeeded() is larger than
freeBytes(), then go to frames containing 8-bit artwork and divide by 1024 to convert bytes to
kilobytes (K).
Parameters
intFromFrame
Required. An integer that specifies the number of the first frame in the range.
intToFrame Required. An integer that specifies the number of the last frame in the range.
Example
This statement sets the variable frameSize to the number of bytes needed to display frames 100
to 125 of the movie:
-- Lingo syntax
frameSize = _movie.ramNeeded(100, 125)
// JavaScript syntax
var frameSize = _movie.ramNeeded(100, 125);