| Name |
Type |
Description |
| animationStyle |
Object |
Determines whether the Virtual Space should automatically animate without any user interaction, and sets the properties of the animation.
- angleX:Number - the amount the Virtual Space should rotate on the x-axis for each iteration of the animation.
- angleY:Number - the amount the Virtual Space should rotate on the y-axis for each iteration of the animation.
- easing:Object - the easing class to be used (see fl.transitions.easing).
- enabled:Boolean - determines whether animation is turned on (true) or not (false).
- duration:Number - the amount of time (in milliseconds) for each iteration of the animation. For example, a setting of 3000 would animate the Virtual Space with the given settings every 3 seconds.
- loop:Boolean - determines whether the animation will continue after one full rotation around the Virtual Space (true) or not (false).
- type:Object - the easing type to be used (see fl.transitions.easing).
Example
myVS.animationStyle = {angleX:45, angleY:0, easing:easeOut, enabled:true, duration:3000, loop:true, type:Strong}; |
| controlsStyle |
Object |
Determines how mouse interaction will work with the Virtual Space.
- acceleration:Number - the amount that Virtual Space movement should accelerate as the user presses the left mouse button longer. Only works for centered and pointed model types.
- continuous:Boolean - determines whether the Virtual Space will flip the angles and continue to animate when the maximum angle is reached (true) or not (false).
- invertRotationX:Boolean - determines whether rotation on the x-axis is inverted (true) or not (false).
- invertRotationY:Boolean - determines whether rotation on the y-axis is inverted (true) or not (false).
- maxAngleX:Number - sets the maximum allowed rotation on the x-axis.
- maxAngleY:Number - sets the maximum allowed rotation on the y-axis.
- modelType:String - controls the interaction behavior. Options include:
- centered - camera remains fixed in the center of the room.
- pointed - camera is pointed by mouse
- mapped - camera uses mapped angles on Virtual Space bounds
- drag - user can drag the Virtual Space
- speed:Number - animation speed.
- type:String - controls activation type (auto is always on, click means controls are turned on by clicking the component).
Example
myVS.controlsStyle = {acceleration:3, continuous:true, invertRotationX:false, invertRotationY:false, maxAngleX:180, maxAngleY:180, modelType:"centered", speed:1, type:"auto"}; |
| cubeStyle |
Object |
Sets the content for Visual Space.
- back:* - the path to the image or class name to be used on the back pane.
- bottom:* - the path to the image or class name to be used on the bottom pane.
- front:* - the path to the image or class name to be used on the front pane.
- left:* - the path to the image or class name to be used on the left pane.
- right:* - the path to the image or class name to be used on the right pane.
- top:* - the path to the image or class name to be used on the top pane.
Example
myVS.cubeStyle = {back:"some_img.jpg", bottom:myClass, front:"some_img.jpg", left:myClass, right:"some_img.jpg", top:myClass}; |
| displayStyle |
Object |
Sets the style of the image containers for each side.
- alignH:String - horizontal alignment.
- alignV:String - vertical alignment.
- backgroundAlpha:Number - alpha of the background container.
- backgroundColor:Uint - color of the background.
- drawBackground:Boolean - determines whether background should be drawn (true) or not (false).
- maintainAspectRatio:Boolean - determines whether loaded image should maintain aspect ratio (true) or not (false).
- overStroke:Boolean - determines whether a stroke should be shown (true) or not (false).
- paddingWidth:Number - the amount of horizontal padding.
- paddingHeight:Number - the amount of vertical padding.
- strokeAlpha:Number - alpha of the stroke.
- strokeColor:Uint - color of the stroke.
- strokeThickness:Number
- transformAsCube:Boolean - whether to preserve panorama transformations to cube. If set to false, view can be transformed in any rectangle. Panoramas object always shown as cube, but you can change it size by scaling options.
Example
myVS.displayStyle = {alignH:"center", alignV:"center", backgroundAlpha:0.5, backgroundColor:0x000000, drawBackground:true, maintainAspectRatio:false, overStroke:true, paddingWidth:5, paddingHeight:5, strokeAlpha:0.5, strokeColor:0x000000, strokeThickness:2, transformAsCube:true}; |
| errorClip |
String |
Class to be displayed when there is an error loading a side.
Example
myVS.errorClip = "myClass"; |
| panoramaStyle |
Object |
Set the initial view settings for the Visual Space.
- angleX:Number - the initial angle on the x-axis.
- angleY:Number - the initial angle on the y-axis.
- angleZ:Number - the initial angle on the z-axis.
- scaleX:Number - the scale on the x-axis.
- scaleY:Number - the scale on the y-axis.
- scaleZ:Number - the scale on the z-axis.
Example
myVS.panoramaStyle = {angleX:30, angleY:0, angleZ:-15, scaleX:0.75, scaleY:0, scaleZ:0}; |
| previewClip |
String |
The class name to be used to indicate that image loading is in progress.
Example
myVS.previewClip = "myClass"; |
| Name |
Return Type |
Description |
setSize( width:Number, height:Number ) |
Void |
Set the width and height of the Virtual Space view window. Alternatively, you could just set the width and height properties.
Example
myVS.setSize(400, 300); |
setDisplay( display:*, frontFirst:Boolean = true ) |
Void |
Gets an image and breaks it into four sides for the Visual Space. The display parameter can be a Class, Class Name, DisplayObject or BtmapData. The default setting for frontFirst is true which will result in a load order of front, right, back, left. A setting of false will result in a load order of left, front, right, back.
Example
myVS.setDisplay(myClass); // myClass contains some image |