![MACROMEDIA DIRECTOR MX 2004-DIRECTOR SCRIPTING Reference Download Page 323](http://html1.mh-extra.com/html/macromedia/director-mx-2004-director-scripting/director-mx-2004-director-scripting_reference_3321720323.webp)
freeBytes()
323
Example
This statement determines whether the largest contiguous free block is smaller than 10K and
displays an alert if it is:
-- Lingo syntax
if (the freeBlock < (10 * 1024)) then alert "Not enough memory!"
// JavaScript syntax
if (freeBlock < (10 * 1024)) {
alert("Not enough memory!")
}
See also
freeBytes()
,
memorySize
,
ramNeeded()
,
size
freeBytes()
Usage
the freeBytes
Description
Function; indicates the total number of bytes of free memory, which may not be contiguous. A
kilobyte (K) is 1024 bytes. A megabyte (MB) is 1024 kilobytes.
This function differs from
freeBlock
in that it reports all free memory, not just
contiguous memory.
On the Macintosh, selecting Use System Temporary Memory in the Director General Preferences
or in a projector’s Options dialog box tells the
freeBytes
function to return all the free memory
that is available to the application. This amount equals the application’s allocation shown in its
Get Info dialog box and the Largest Unused Block value in the About This Macintosh dialog box.
Parameters
None.
Example
This statement checks whether more than 200K of memory is available and plays a color movie
if it is:
if (the freeBytes > (200 * 1024)) then play movie "colorMovie"
See also
freeBlock()
,
memorySize
,
objectP()
,
ramNeeded()
,
size
Summary of Contents for DIRECTOR MX 2004-DIRECTOR SCRIPTING
Page 1: ...DIRECTOR MX 2004 Director Scripting Reference...
Page 48: ...48 Chapter 2 Director Scripting Essentials...
Page 100: ...100 Chapter 4 Debugging Scripts in Director...
Page 118: ...118 Chapter 5 Director Core Objects...
Page 594: ...594 Chapter 12 Methods...
Page 684: ...684 Chapter 14 Properties See also DVD...
Page 702: ...702 Chapter 14 Properties See also face vertices vertices flat...
Page 856: ...856 Chapter 14 Properties JavaScript syntax sprite 15 member member 3 4...
Page 1102: ...1102 Chapter 14 Properties...