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 Q in Windows or 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);
Содержание DIRECTOR MX 2004-DIRECTOR SCRIPTING
Страница 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Страница 48: ...48 Chapter 2 Director Scripting Essentials...
Страница 100: ...100 Chapter 4 Debugging Scripts in Director...
Страница 118: ...118 Chapter 5 Director Core Objects...
Страница 594: ...594 Chapter 12 Methods...
Страница 684: ...684 Chapter 14 Properties See also DVD...
Страница 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Страница 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Страница 889: ...netPresent 889 _player alert Sorry the Network Support Xtras could not be found See also Player...
Страница 1102: ...1102 Chapter 14 Properties...