Director Help

unLoad() (Member)

Usage

-- Lingo syntax
memberObjRef.unLoad({toMemberObjRef})

// JavaScript syntax
memberObjRef.unLoad({toMemberObjRef});

Description

Member method; forces Director to clear the specified cast members from memory.

Director automatically unloads the least recently used cast members to accommodate preLoad() methods or normal cast library loading.

  • When used without a parameter, unLoad() clears from memory the current cast member.
  • When used with the toMemberObjRef parameter, unLoad() clears from memory all the cast members in the range specified.

When used in a new movie with no loaded cast members, this method returns an error.

Cast members that you have modified during authoring or by setting picture, pasteClipBoadInto(), and so on, cannot be unloaded.

Parameters

toMemberObjRef Optional. A reference to the last cast member in the range to clear from memory.

Example

This statement clears the cast member named Ships from memory:

-- Lingo syntax
member("Ships").unLoad()

// JavaScript syntax
member("Ships").unLoad();

This statement clears from memory cast members 10 through 15:

-- Lingo syntax
member(10).unLoad(15)

// JavaScript syntax
member(10).unLoad(15);

See also

Member unLoad() (Movie) unLoadMember() unLoadMovie()