Packagecom.worlize.api.model
Classpublic class RoomObject
InheritanceRoomObject Inheritance flash.events.EventDispatcher
Subclasses ThisRoomObject

Product Version : Worlize APIv.1

Represents a Worlize Object (app) in the current room.

See also

com.worlize.api.model.ThisRoomObject
com.worlize.api.model.ThisRoom


Public Properties
 PropertyDefined By
  creatorGuid : String
[read-only] The GUID of the user who originally uploaded this app and/or published it in the app store.
RoomObject
  destinationRoomGuid : String
[read-only] The GUID of the "destination" room chosen by the user for this object within the room.
RoomObject
  guid : String
[read-only] The Object's Globally Unique Identifier The guid represents the object definition's guid which is the same across all instances of the object (app).
RoomObject
  height : Number
[read-only] The current height of the object (app) in pixels.
RoomObject
  identifier : String
[read-only] The text identifier that the user chose for this object within the room.
RoomObject
  instanceGuid : String
[read-only] This Object Instance's Globally Unique Identifier The instanceGuid represents this specific instance of the object (app).
RoomObject
  name : String
[read-only] The given name of the object.
RoomObject
  state : String
[read-only]
RoomObject
  width : Number
[read-only] The current width of the object (app) in pixels.
RoomObject
  x : Number
[read-only] The horizontal position of the top-left corner of the object (app) in pixels.
RoomObject
  y : Number
[read-only] The vertical position of the top-left corner of the object (app) in pixels.
RoomObject
Public Methods
 MethodDefined By
  
Constructor.
RoomObject
  
sendMessage(message:Object, toUserGuids:Array = null):void
Sends a message to the object (app) via the server.
RoomObject
  
sendMessageLocal(message:Object):void
Sends a message to the object (app) only for the current user.
RoomObject
Events
 Event Summary Defined By
  Dispatched after the object has been moved.RoomObject
  Dispatched after the object has been resized.RoomObject
  Dispatched after the object has changed state.RoomObject
Property Detail
creatorGuidproperty
creatorGuid:String  [read-only]

Product Version : Worlize API.v1

The GUID of the user who originally uploaded this app and/or published it in the app store.


Implementation
    public function get creatorGuid():String

See also

destinationRoomGuidproperty 
destinationRoomGuid:String  [read-only]

Product Version : Worlize API.v1

The GUID of the "destination" room chosen by the user for this object within the room.


Implementation
    public function get destinationRoomGuid():String

See also

guidproperty 
guid:String  [read-only]

Product Version : Worlize APIv.1

The Object's Globally Unique Identifier

The guid represents the object definition's guid which is the same across all instances of the object (app). This is as opposed to the instanceGuid property, which will be unique for each instance of the object (app).

For example, if you create a checkers game to sell in the app store and 5,000 people buy it and place it into rooms, each of those 5,000 instances will have a unique instanceGuid but will share the same guid.


Implementation
    public function get guid():String

See also

heightproperty 
height:Number  [read-only]

Product Version : Worlize API.v1

The current height of the object (app) in pixels.


Implementation
    public function get height():Number
identifierproperty 
identifier:String  [read-only]

Product Version : Worlize API.v1

The text identifier that the user chose for this object within the room.

The user can choose to assign a text identifier to objects in their rooms. To do so, in Author mode select an object (app) and enter an identifier in the Object Properties panel.

Not yet implemented.


Implementation
    public function get identifier():String
instanceGuidproperty 
instanceGuid:String  [read-only]

Product Version : Worlize APIv.1

This Object Instance's Globally Unique Identifier

The instanceGuid represents this specific instance of the object (app). This is as opposed to the guid property which will be the same for every instance of the given app.

For example, if you create a checkers game to sell in the app store and 5,000 people buy it and place it into rooms, each of those 5,000 instances will have a unique instanceGuid but will share the same guid.

Any persistent data, such as is stored by the ConfigData class, is keyed based on the instanceGuid and so will be unique to that particular instance.


Implementation
    public function get instanceGuid():String

See also

nameproperty 
name:String  [read-only]

Product Version : Worlize API.v1

The given name of the object.

This is the name that the app author chose for the object when publishing the app, by setting the static APIOptions.name property before app initialization.


Implementation
    public function get name():String

See also

stateproperty 
state:String  [read-only]


Implementation
    public function get state():String
widthproperty 
width:Number  [read-only]

Product Version : Worlize API.v1

The current width of the object (app) in pixels.


Implementation
    public function get width():Number
xproperty 
x:Number  [read-only]

Product Version : Worlize API.v1

The horizontal position of the top-left corner of the object (app) in pixels.

The number is relative to the room's coordinate space.


Implementation
    public function get x():Number
yproperty 
y:Number  [read-only]

Product Version : Worlize API.v1

The vertical position of the top-left corner of the object (app) in pixels.

The number is relative to the room's coordinate space.


Implementation
    public function get y():Number
Constructor Detail
RoomObject()Constructor
public function RoomObject()

Product Version : Worlize API.v1

Constructor.

Method Detail
sendMessage()method
public function sendMessage(message:Object, toUserGuids:Array = null):void

Product Version : Worlize API.v1

Sends a message to the object (app) via the server.

This method can be used for updating state across multiple connected clients or for inter-app messaging.

A messageReceived event will be emitted in all the apps that receive the message

Parameters

message:Object — any AMF3-serializable object
 
toUserGuids:Array (default = null) — (optional) an array of user guids to restrict which users will receive the message. Pass null to send the message to all users in the room.

See also

sendMessageLocal()method 
public function sendMessageLocal(message:Object):void

Product Version : Worlize API.v1

Sends a message to the object (app) only for the current user.

This method can be used for inter-app messaging.

A messageReceived event will be emitted in all the apps that receive the message

This is similar to the sendMessage except that the message is not routed through the server and instead is delivered directly to the given app on the local machine only.

Parameters

message:Object — any AMF3-serializable object

See also

Event Detail
objectMoved Event
Event Object Type: com.worlize.api.event.RoomObjectEvent
RoomObjectEvent.type property = com.worlize.api.event.RoomObjectEvent.OBJECT_MOVED

Product Version : Worlize API.v1

Dispatched after the object has been moved.

The RoomObjectEvent.OBJECT_MOVED constant defines the value of the type property of the event object for a objectMoved event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
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.
roomObjectThe object associated with the event. See com.worlize.api.model.RoomObject.
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.
objectResized Event  
Event Object Type: com.worlize.api.event.RoomObjectEvent
RoomObjectEvent.type property = com.worlize.api.event.RoomObjectEvent.OBJECT_RESIZED

Product Version : Worlize API.v1

Dispatched after the object has been resized.

The RoomObjectEvent.OBJECT_RESIZED constant defines the value of the type property of the event object for a objectResized event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
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.
roomObjectThe object associated with the event. See com.worlize.api.model.RoomObject.
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.
objectStateChanged Event  
Event Object Type: com.worlize.api.event.RoomObjectEvent
RoomObjectEvent.type property = com.worlize.api.event.RoomObjectEvent.OBJECT_STATE_CHANGED

Product Version : Worlize API.v1

Dispatched after the object has changed state.

The RoomObjectEvent.OBJECT_STATE_CHANGED constant defines the value of the type property of the event object for a objectStateChanged event.

The properties of the event object have the following values:

PropertyValue
bubblesfalse
cancelablefalse
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.
roomObjectThe object associated with the event. See com.worlize.api.model.RoomObject.
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.