composer.removeHidden()

Type Function
Library composer.*
Return value none
Revision Current Public Release (2014.2381)
Keywords composer, scene, remove, removeHidden
See also composer.removeScene()

Overview

This function removes (or optionally recycles) all scenes except for the currently active scene. A destroy event is first dispatched to all of these scenes.

To recycle the scenes instead of removing them entirely, you may set the shouldRecycle parameter to true — this means that each scene's self.view display group will be removed, but their scene objects will remain in memory. If shouldRecycle is omitted or set to false (default), the scenes will be removed entirely, including their scene objects.

Syntax

composer.removeHidden( shouldRecycle )
shouldRecycle (optional)

Boolean. If the scenes should be recycled, but not removed entirely, set this parameter to true. Default is false.

Examples

-- Completely removes all scenes except for the currently active scene
composer.removeHidden()
-- Recycles all scenes except for the currently active scene
composer.removeHidden( true )