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(),
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
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
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
in that it reports all free memory, not just
freeBlock
freeBytes
function to return all the free memory
size
freeBytes()
323
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers