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

Product Version : Worlize API.v1

Represents the currently executing object (app).

This class adds additional functionality to its RoomObject superclass, including making a few read-only properties writable including:

See also

com.worlize.model.RoomObject


Public Properties
 PropertyDefined By
 InheritedcreatorGuid : String
[read-only] The GUID of the user who originally uploaded this app and/or published it in the app store.
RoomObject
 InheriteddestinationRoomGuid : String
[read-only] The GUID of the "destination" room chosen by the user for this object within the room.
RoomObject
 Inheritedguid : 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
The current height of the object (app) in pixels.
ThisRoomObject
 Inheritedidentifier : String
[read-only] The text identifier that the user chose for this object within the room.
RoomObject
 InheritedinstanceGuid : String
[read-only] This Object Instance's Globally Unique Identifier The instanceGuid represents this specific instance of the object (app).
RoomObject
 Inheritedname : String
[read-only] The given name of the object.
RoomObject
 Inheritedstate : String
[read-only]
RoomObject
  width : Number
The current width of the object (app) in pixels.
ThisRoomObject
  x : Number
The horizontal position of the top-left corner of the object (app) in pixels.
ThisRoomObject
  y : Number
The vertical position of the top-left corner of the object (app) in pixels.
ThisRoomObject
Public Methods
 MethodDefined By
  
moveTo(x:Number, y:Number):void
Moves the object (app) to the specified coordinates locally.
ThisRoomObject
 Inherited
sendMessage(message:Object, toUserGuids:Array = null):void
Sends a message to the object (app) via the server.
RoomObject
 Inherited
sendMessageLocal(message:Object):void
Sends a message to the object (app) only for the current user.
RoomObject
  
setSize(width:Number, height:Number):void
Changes the visible drawing area of the current object (app) locally.
ThisRoomObject
Events
 Event Summary Defined By
  Dispatched when a message is received from an object (app)ThisRoomObject
 InheritedDispatched after the object has been moved.RoomObject
 InheritedDispatched after the object has been resized.RoomObject
 InheritedDispatched after the object has changed state.RoomObject
Property Detail
heightproperty
height:Number

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


Implementation
    public function get height():Number
    public function set height(value:Number):void
widthproperty 
width:Number

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


Implementation
    public function get width():Number
    public function set width(value:Number):void
xproperty 
x:Number

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
    public function set x(value:Number):void
yproperty 
y:Number

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
    public function set y(value:Number):void
Method Detail
moveTo()method
public function moveTo(x:Number, y:Number):void

Product Version : Worlize API.v1

Moves the object (app) to the specified coordinates locally.

The coordinates are of the top-left corner of the object (app) and are relative to the room's coordinate space.

NOTE: This will only move the app for the current user on the local machine. This does not broadcast an event through the server and other users will not see the app move.

Parameters

x:Number — the horizontal position of the object in pixels
 
y:Number — the vertical position of the object in pixels

setSize()method 
public function setSize(width:Number, height:Number):void

Product Version : Worlize API.v1

Changes the visible drawing area of the current object (app) locally.

The visible area of an app is clipped to the specified dimensions. Apps cannot draw outside their specified boundaries, so if you need to you can use a combination of the setSize() and moveTo() methods.

NOTE: This will only resize the app for the current user on the local machine. This does not broadcast an event through the server and other users will not see the app change size.

Parameters

width:Number — the desired width in pixels
 
height:Number — the desired height in pixels

Event Detail
messageReceived Event
Event Object Type: com.worlize.api.event.MessageEvent
MessageEvent.type property = com.worlize.api.event.MessageEvent.MESSAGE_RECEIVED

Product Version : Worlize API.v1

Dispatched when a message is received from an object (app)

The MessageEvent.MESSAGE_RECEIVED constant defines the value of the type property of the event object for a messageReceived 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.
fromUserThe user who sent the message. See com.worlize.api.model.User.
fromObjectThe object that sent the message. See com.worlize.api.model.RoomObject.
messageThe message received.
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.

See also