Lingo Dictionary > O-R > purgePriority |  |

purgePriority

Syntax

    member(whichCastMember).purgePriority
    the purgePriority of member whichCastMember

Description

Cast member property; specifies the purge priority of the cast member specified by `whichCastMember`.

Cast members' purge priorities determine the priority that Director follows to choose which cast members to delete from memory when memory is full. The higher the purge priority, the more likely that the cast member will be deleted. The following `purgePriority` settings are available:

| 0—Never
| 1—Last
| 2—Next
| 3—Normal

Normal, which is the default, lets Director purge cast members from memory at random. Next, Last, and Never allow some control over purging, but Last or Never may cause your movie to run out of memory if several cast members are set to these values.

Setting `purgePriority` for cast members is useful for managing memory when the size of the movie's cast exceeds the available memory. As a general rule, you can minimize pauses while the movie loads cast members and reduce the number of times Director reloads a cast member by assigning a low purge priority to cast members that are used frequently in the course of the movie.

Example

This statement sets the purge priority of cast member Background to 3, which makes it one of the first cast members to be purged when memory is needed:

    member("Background").purgePriority = 3