Classpublic class ConfigData
InheritanceConfigData Inheritance

Stores persistent configuration about the app instance.

The contents of the data property are serialized to JSON format and saved on the Worlize servers. The data is unique to the object instance and cannot be shared across multiple instances of the object or read by other objects.

All config data is cleared from the server when the object is removed from the room.

NOTE: Only users with the canAuthor privilege may modify the persistent config data.

View the examples

Public Properties
 PropertyDefined By
  data : Object
An object containing the config data that will be saved when you call save().
Public Methods
 MethodDefined By
ConfigData(initialConfig:Object = null)
Saves the current value of data to the server.
 Event Summary Defined By
  Dispatched after an object in the room has been resized.ConfigData
Property Detail

Product Version : Worlize API.v1

An object containing the config data that will be saved when you call save(). It must be JSON-serializable.

    public function get data():Object
    public function set data(value:Object):void
Constructor Detail
public function ConfigData(initialConfig:Object = null)

Product Version : Worlize API.v1


The ConfigData instance is created and managed by the WorlizeAPI class. You do not instantiate this object yourself.

initialConfig:Object (default = null)

How to get a reference to the ConfigData instance
         var api:WorlizeAPI = WorlizeAPI.getInstance();
         var config:ConfigData = api.config;
Method Detail
public function save():void

Product Version : Worlize API.v1

Saves the current value of data to the server.

This function will serialize the object stored in the data property to JSON format and send it to the server to be saved.

Event Detail
propertyChanged Event
Event Object Type: com.worlize.api.event.ChangeEvent
ChangeEvent.type property = com.worlize.api.event.ChangeEvent.PROPERTY_CHANGED

Product Version : Worlize API.v1

Dispatched after an object in the room has been resized.

The ChangeEvent.PROPERTY_CHANGED constant defines the value of the type property of the event object for a propertyChanged event.

The properties of the event object have the following values:

currentTargetThe Object that defines the event listener that handles the event. For example, if you use myButton.addEventListener() to register an event listener, myButton is the value of the currentTarget.
nameThe name of the property that changed on the target object.
changedByA User instance that represents the Worlize user who changed the property, if available
newValueThe new value of the property
oldValueThe old value of the property, as it was before it was changed.
targetThe Object that dispatched the event; it is not always the Object listening for the event. Use the currentTarget property to always access the Object listening for the event.
Save a property in the persistent config data
     var api:WorlizeAPI = WorlizeAPI.getInstance(); = 0xFFAAAA;;