User Guide

257
Example
When used in a Score recording session, this statement makes the cast member Fog the transition
for the frame that Lingo is currently recording:
set the frameTransition to member "Fog"
freeBlock()
Syntax
the freeBlock
Description
Function; indicates the size of the largest free contiguous block of memory, in bytes. A kilobyte
(K) is 1024 bytes. A megabyte (MB) is 1024 kilobytes. Loading a cast member requires a free
block at least as large as the cast member.
Example
This statement determines whether the largest contiguous free block is smaller than 10K and
displays an alert if it is:
if (the freeBlock < (10 * 1024)) then alert "Not enough memory!"
See also
freeBytes(), memorySize, ramNeeded(), size
freeBytes()
Syntax
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 applications allocation shown in its
Get Info dialog box and the Largest Unused Block value in the About This Macintosh dialog box.
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