-- Lingo syntax
memberObjRef.unLoad({toMemberObjRef})
// JavaScript syntax
memberObjRef.unLoad({toMemberObjRef});
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 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.
toMemberObjRef Optional. A reference to the last cast member in the range to clear from memory.
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);