Packagesandy.core
Classpublic class SceneLocator

The SceneLocator serves as a registry of all scenes in the application.

An application can only have one SceneLocator. Using the SceneLocator, scenes can be located, registered, and unregistered.

When scenes are created in an application, they aoutomatically register with the SceneLocator registry.

See also

Scene3D


Public Methods
 MethodDefined by
  
SceneLocator(access:PrivateConstructorAccess)
Creates the SceneLocator registry.
SceneLocator
  
[static] Returns a SceneLocator.
SceneLocator
  
getScene(key:String):Scene3D
Returns the Scene3D object with the specified name.
SceneLocator
  
isRegistered(key:String):Boolean
Check if a scene with the specified name is registered.
SceneLocator
  
registerScene(key:String, o:Scene3D):Boolean
Registers a scene.
SceneLocator
  
unregisterScene(key:String):void
Unregisters a scene with the specified name.
SceneLocator
Constructor detail
SceneLocator()constructor
public function SceneLocator(access:PrivateConstructorAccess)

Creates the SceneLocator registry.

This constructor is never called directly. Instead you get the registry instance by calling SceneLocator.getInstance().

Parameters
access:PrivateConstructorAccess — A singleton access flag object
Method detail
getInstance()method
public static function getInstance():SceneLocator

Returns a SceneLocator.

Returns
SceneLocator — The single locator.
getScene()method 
public function getScene(key:String):Scene3D

Returns the Scene3D object with the specified name.

Parameters
key:String — The name of the scene.

Returns
Scene3D — The requested scene.
isRegistered()method 
public function isRegistered(key:String):Boolean

Check if a scene with the specified name is registered.

Parameters
key:String — key The Name of the scene to check.

Returns
Boolean — true if a scene with that name is registered, false otherwise.
registerScene()method 
public function registerScene(key:String, o:Scene3D):Boolean

Registers a scene.

Parameters
key:String — : String, name of the scene to register.
 
o:Scene3D — : Scene3D, object to register.

Returns
Boolean — true if the registration was successful, false otherwise.
unregisterScene()method 
public function unregisterScene(key:String):void

Unregisters a scene with the specified name.

Parameters
key:String — The name of the scene to unregister.