Inheritance MovieClip > controlVR
The properties of the controlVR class allows you to manipulate and load VR objects. Setting a property of the controlVR class with ActionScript overrides the parameter of the same name set in the Property inspector, Component inspector or XML attributes that may have been set.
Warning:
XML files will override any properties that have been set. Therefore change properties only after the object has been loaded.
The following table lists method of the controlVR class.
| Method | Description |
|---|---|
controlVR.loadVR(url:String):Void |
Loads a specific XML file which contains the info for a VR object. |
controlVR.moveDown():Void |
Rotate the object Down |
controlVR.moveLeft():Void |
Rotate the object Counter Clockwise |
controlVR.moveRight():Void |
Rotate the object Clockwise |
controlVR.moveUp():Void |
Rotate the object Up |
controlVR.setActiveImage(image:Number):Void |
Set active image in image array |
controlVR.getActiveImage():Number |
Get active image in image array |
controlVR.setTempo(tempo:Number):Void |
Set the speed of auto rotation |
controlVR.spinStart():Void |
Start's auto rotate |
controlVR.spinStop():Void |
Stop's auto rotate |
controlVR.zoomIn():Void |
Zoom the object in (larger) |
controlVR.zoomOut():Void |
Zoom the object out (smaller) |
controlVR.zoomReset():Void |
Reset Zoom on the object |
controlVR.giveControl():Void |
Gives the VR object mouse and keyboard control. |
controlVR.removeControl():Void |
Removes the VR object mouse and keyboard control. |
The following table lists the properties of the controlVR class.
| Property | Description |
|---|---|
controlVR.width |
Read-only; Returns the width of the current VR Object |
controlVR.height |
Read-only; Returns the height of the current VR Object |
controlVR.imageXCount |
Read-only; Returns the amount of images per layer of the current VR Object |
controlVR.imageYCount |
Read-only; Returns the amount of layers of the current VR Object |
controlVR.imageCount |
Read-only; Returns the total number of images of the current VR Object |
controlVR.title |
Read-only; Returns the title of the current VR Object |
The following table lists event handler of the ControlVR class.
| Event handler | Description |
|---|---|
controlVR.onLoadProgress |
Invoked every time the loading content is written to the hard disk during the loading process. |
controlVR.onLoadError |
Invoked when a error occurs |
controlVR.onComplete |
Invoked when all the files in the VR object were loaded without any errors. |