Packagecom.worlize.api
Classpublic class APIOptions
InheritanceAPIOptions Inheritance Object

Product Version : Worlize APIv.1

Allows the app developer to set various config options for the Worlize API.

Properties on this class must be set before the API is initialized.

View the examples

See also

WorlizeAPI.init()


Public Properties
 PropertyDefined By
  defaultHeight : int
The initial height of the object (app) in pixels.
APIOptions
  defaultWidth : int
The initial width of the object (app) in pixels.
APIOptions
  editModeSupported : Boolean = false
Whether the app supports a custom configuration user interface when a room author activates the app's edit mode.
APIOptions
  fullSize : Boolean = false
Whether the app is adjusted to take up the entire size of the room Not yet implemented
APIOptions
  maxHeight : int = 0x7FFFFFFF
When resizableByUser is true, specifies the maximum allowable height for the app.
APIOptions
  maxWidth : int = 0x7FFFFFFF
When resizableByUser is true, specifies the maximum allowable width for the app.
APIOptions
  minHeight : int = 0
When resizableByUser is true, specifies the minimum allowable height for the app.
APIOptions
  minWidth : int = 0
When resizableByUser is true, specifies the minimum allowable width for the app.
APIOptions
  name : String = Untitled App
The name of the app, as it will appear to the user in their list of apps.
APIOptions
  nonVisual : Boolean = false
Whether the app has a visual user interface.
APIOptions
  resizableByUser : Boolean = false
Whether the app is dynamically sizable by the user.
APIOptions
Property Detail
defaultHeightproperty
defaultHeight:int

Product Version : Worlize APIv.1

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

This value will be ignored if resizableByUser is true and the user has resized the object.

NOTE: If you do not explicitly set either defaultWidth or defaultHeight, the natural height of the SWF file will be used. This is done to support the setting of the stage size in Adobe Flash Professional.

The default value is 375.


Implementation
    public function get defaultHeight():int
    public function set defaultHeight(value:int):void
defaultWidthproperty 
defaultWidth:int

Product Version : Worlize APIv.1

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

This value will be ignored if resizableByUser is true and the user has resized the object.

NOTE: If you do not explicitly set either defaultWidth or defaultHeight, the natural height of the SWF file will be used. This is done to support the setting of the stage size in Adobe Flash Professional.

The default value is 500.


Implementation
    public function get defaultWidth():int
    public function set defaultWidth(value:int):void
editModeSupportedproperty 
public var editModeSupported:Boolean = false

Product Version : Worlize API.v1

Whether the app supports a custom configuration user interface when a room author activates the app's edit mode.

Set this to true to enable the "Edit Settings..." button in the Object Properties dialog when the user is in Author Mode.

fullSizeproperty 
public var fullSize:Boolean = false

Product Version : Worlize API.v1

Whether the app is adjusted to take up the entire size of the room

Not yet implemented

maxHeightproperty 
public var maxHeight:int = 0x7FFFFFFF

Product Version : Worlize APIv.1

When resizableByUser is true, specifies the maximum allowable height for the app.

Ignored when resizableByUser is false.

Not yet implemented

maxWidthproperty 
public var maxWidth:int = 0x7FFFFFFF

Product Version : Worlize APIv.1

When resizableByUser is true, specifies the maximum allowable width for the app.

Ignored when resizableByUser is false.

Not yet implemented

minHeightproperty 
public var minHeight:int = 0

Product Version : Worlize APIv.1

When resizableByUser is true, specifies the minimum allowable height for the app.

Ignored when resizableByUser is false.

Not yet implemented

minWidthproperty 
public var minWidth:int = 0

Product Version : Worlize APIv.1

When resizableByUser is true, specifies the minimum allowable width for the app.

Ignored when resizableByUser is false.

Not yet implemented

nameproperty 
public var name:String = Untitled App

Product Version : Worlize API.v1

The name of the app, as it will appear to the user in their list of apps.

nonVisualproperty 
public var nonVisual:Boolean = false

Product Version : Worlize API.v1

Whether the app has a visual user interface.

Certain apps will not need to provide a user interface, such as moderation apps that affect the actions that occur in the room, i.e. a bad language filter.

Apps that are non-visual will still have an opportunity to present an on-screen configuration interface when the "Edit Settings" mode is activated by a room author.

Not yet implemented

resizableByUserproperty 
public var resizableByUser:Boolean = false

Product Version : Worlize API.v1

Whether the app is dynamically sizable by the user.

If true, then defaultWidth and defaultHeight will have no effect. Instead, the user-adjusted size will be used as the initial app size.

When true, the values specified for the following properties will restrict the range of sizes the user can select for the app:

Not yet implemented

Examples
Set config options
     
     public class AvatarDispenser extends Sprite
     {
       // top level app constructor function
       function AvatarDispenser() {
     
         // The object instance is accessed via the options static
         // property on the WorlizeAPI class. 
         var options:APIOptions = WorlizeAPI.options;
     
         // Give the app a name
         options.name = "Avatar Dispenser Pro";
     
         // Specify the app's initial size
         options.defaultWidth = 200;
         options.defaultHeight = 150;
     
         // Initialize the api FTERsetting the config options
         WorlizeAPI.init(this);
       }
     }