PackageTop Level
Classpublic class PanoSalado
InheritancePanoSalado Inheritance flash.display.Sprite

The PanoSalado Class is used to display panoramas in cubic (or equirectangular, cylindrical, or QTVR format). It is primarily meant to be used in conjunction with ModuleLoader.as, with ModulueLoader loading the XML descriptor file and then loading the compiled PanoSalado.swf file and any other swfs to be loaded as specified in the XML descriptor.



Public Properties
 PropertyDefined by
  autorotatorDelay : Number
PanoSalado
  autorotatorOn : Boolean
PanoSalado
  autorotatorRestartDelay : Number
PanoSalado
  bulkLoader : BulkLoader
Bulkloader class that PanoSalado uses for loading assets (images)
PanoSalado
  currentSpace : String = ""
name of the currentSpace as specified in the XML.
PanoSalado
  currentVideo : VideoDisplaySprite
reference to the current VideoDisplaySprite.
PanoSalado
  friction : Number = 0.3
friction of camera after mouse is up
PanoSalado
  isAutorotating : Boolean = false
flag set if camera is autorotating
PanoSalado
  keyIncrement : Number = 75
delta pan / tilt value for key panning / tilting
PanoSalado
  lastSpace : String = ""
reference to the last space that was loaded.
PanoSalado
  loadingSpace : String = ""
name of the space that is currently loading if applicable.
PanoSalado
  resizeDict : Object
objects that need to have their placement changed on stage resize.
PanoSalado
  sensitivity : Number = 60
sensitivity of camera to mouse motion
PanoSalado
  settings : XML
reference to the XML object containing PanoSalado's XML layer node (layer id="PanoSalado")
PanoSalado
  spaces : Array
Array of objects containing the basic PV3D objects for creating a "space", Scene, Camera, Renderer, etc
PanoSalado
  threshold : Number = 0.0001
camera pan / tilt threshold at which motion jumps to 0
PanoSalado
  viewports : Sprite
primary container for the viewports so that they can be isolated from the rest of the display list for easier access.
PanoSalado
  zoomIncrement : Number = 0.2
delta zoom value that will be used for key zooming
PanoSalado
Protected Properties
 PropertyDefined by
  aah : Boolean
PanoSalado
  aaz : Boolean
PanoSalado
  da : Number
PanoSalado
  dp : Number
PanoSalado
  dqa : Boolean
PanoSalado
Public Methods
 MethodDefined by
  
constructor
PanoSalado
  
creates a bitmap hotspot.
PanoSalado
  
change(... args):void
changes a property immediately, unlike a tween, which changes it over time.
PanoSalado
  
cube(xml:XML):Cube
creates a cube.
PanoSalado
  
cylinder(xml:XML):Cylinder
creates a cylinder.
PanoSalado
  
dispatchBroadcast(type:String, ... args):void
dispatches a generic event on ModuleLoader for communication between moduleLoader's layers.
PanoSalado
  
execute(attr:String):void
generic function that executes a function either on this object or from the XML
PanoSalado
  
geodesicSphere(xml:XML):Object
creates a geosphere.
PanoSalado
  
gets a PV3d DisplayObject3D by name
PanoSalado
  
getSpaceByName(name:String):Object
gets a loaded space by name
PanoSalado
  
Special purpose function for populating ComboBox's with space ids and labels.
PanoSalado
  
hotspot(xml:XML):Hotspot
creates a hotspot.
PanoSalado
  
keyDown(direction:String):void
key down event handler
PanoSalado
  
keyUp(direction:String):void
key up event handler
PanoSalado
  
loadSpace(name:String):void
initiates the loading of a new space.
PanoSalado
  
creates a movie hotsport.
PanoSalado
  
openURL(url:String, window:String = "_blank"):void
opens a URL in the browser
PanoSalado
  
plane(xml:XML):Plane
creates a plane.
PanoSalado
  
qtvr(xml:XML):Cube
creates a qtvr.
PanoSalado
  
removes the last loaded space, if applicable
PanoSalado
  
restartAutorotatorTimer(delay:Number = 15000):void
handles restarting the autorotator timer
PanoSalado
  
sphere(xml:XML):Object
creates a sphere.
PanoSalado
  
stageReady(e:Event):void
stage ready is called when ModuleLoader has added PanoSalado to the stage.
PanoSalado
  
startAutorotatorNow(e:TimerEvent = null):void
immediately starts camera autorotation
PanoSalado
  
immediately stops camera autorotation
PanoSalado
  
toggles autorotator.
PanoSalado
  
fullscreen toggle function.
PanoSalado
  
tween(str:String):void
parsers a String tween from the XML, deprecated, and SpinControl will only use XML tweens
PanoSalado
  
tweenXML(str:String):void
parses an XML tween from the XML
PanoSalado
Protected Methods
 MethodDefined by
  
keyDownEvent(event:KeyboardEvent):void
key handler for camera interaction
PanoSalado
  
keyUpEvent(event:KeyboardEvent):void
key up camera interaction handler.
PanoSalado
  
mouseDownEvent(event:MouseEvent):void
mouse down handler for camera interaction
PanoSalado
  
mouseUpEvent(event:Event):void
mouse up camera interaction handler
PanoSalado
  
mouseWheelEvent(event:MouseEvent):void
mouse wheel handler for camera interaction
PanoSalado
Property detail
aahproperty
protected var aah:Boolean
aazproperty 
protected var aaz:Boolean
autorotatorDelayproperty 
autorotatorDelay:Number  [read-write]Implementation
    public function get autorotatorDelay():Number
    public function set autorotatorDelay(value:Number):void
autorotatorOnproperty 
autorotatorOn:Boolean  [read-write]Implementation
    public function get autorotatorOn():Boolean
    public function set autorotatorOn(value:Boolean):void
autorotatorRestartDelayproperty 
autorotatorRestartDelay:Number  [read-write]Implementation
    public function get autorotatorRestartDelay():Number
    public function set autorotatorRestartDelay(value:Number):void
bulkLoaderproperty 
public var bulkLoader:BulkLoader

Bulkloader class that PanoSalado uses for loading assets (images)

currentSpaceproperty 
public var currentSpace:String = ""

name of the currentSpace as specified in the XML.

currentVideoproperty 
public var currentVideo:VideoDisplaySprite

reference to the current VideoDisplaySprite.

daproperty 
protected var da:Number
dpproperty 
protected var dp:Number
dqaproperty 
protected var dqa:Boolean
frictionproperty 
public var friction:Number = 0.3

friction of camera after mouse is up

isAutorotatingproperty 
public var isAutorotating:Boolean = false

flag set if camera is autorotating

keyIncrementproperty 
public var keyIncrement:Number = 75

delta pan / tilt value for key panning / tilting

lastSpaceproperty 
public var lastSpace:String = ""

reference to the last space that was loaded.

loadingSpaceproperty 
public var loadingSpace:String = ""

name of the space that is currently loading if applicable.

resizeDictproperty 
public var resizeDict:Object

objects that need to have their placement changed on stage resize.

sensitivityproperty 
public var sensitivity:Number = 60

sensitivity of camera to mouse motion

settingsproperty 
public var settings:XML

reference to the XML object containing PanoSalado's XML layer node (layer id="PanoSalado")

spacesproperty 
public var spaces:Array

Array of objects containing the basic PV3D objects for creating a "space", Scene, Camera, Renderer, etc

thresholdproperty 
public var threshold:Number = 0.0001

camera pan / tilt threshold at which motion jumps to 0

viewportsproperty 
public var viewports:Sprite

primary container for the viewports so that they can be isolated from the rest of the display list for easier access.

zoomIncrementproperty 
public var zoomIncrement:Number = 0.2

delta zoom value that will be used for key zooming

Constructor detail
PanoSalado()constructor
public function PanoSalado()

constructor

Method detail
bitmapHotspot()method
public function bitmapHotspot(xml:XML):Hotspot

creates a bitmap hotspot. Will be called by hotspot if the asset url does not end with '.swf'. it can be used directly with a bitmapHotspot node in the XML

Parameters
xml:XML

Returns
Hotspot
change()method 
public function change(... args):void

changes a property immediately, unlike a tween, which changes it over time.

Parameters
... args

See also

tweenXML
cube()method 
public function cube(xml:XML):Cube

creates a cube. not to be called directly. in the descriptor XML, a 'cube' node will cause this to be called.

Parameters
xml:XML

Returns
Cube
cylinder()method 
public function cylinder(xml:XML):Cylinder

creates a cylinder. not to be called directly. in the descriptor XML, a 'cylinder' node will cause this to be called.

Parameters
xml:XML

Returns
Cylinder
dispatchBroadcast()method 
public function dispatchBroadcast(type:String, ... args):void

dispatches a generic event on ModuleLoader for communication between moduleLoader's layers.

Parameters
type:String — event type that is being listened for.
 
... args — arguments are stored in the 'info' object to allow sending information along with the event e.g. tooltip text.
execute()method 
public function execute(attr:String):void

generic function that executes a function either on this object or from the XML

Parameters
attr:String — A String with the name of the function to execute
geodesicSphere()method 
public function geodesicSphere(xml:XML):Object

creates a geosphere. not to be called directly. in the descriptor XML, a 'geodesicSphere' node will cause this to be called.

Parameters
xml:XML

Returns
Object
getDisplayObject3dByName()method 
public function getDisplayObject3dByName(name:String):DisplayObject3D

gets a PV3d DisplayObject3D by name

Parameters
name:String — A String with the name

Returns
DisplayObject3D — DisplayObject3D
getSpaceByName()method 
public function getSpaceByName(name:String):Object

gets a loaded space by name

Parameters
name:String — A String value with the name of the space to retrieve.

Returns
Object — Object
getSpacesAndLabels()method 
public function getSpacesAndLabels():Array

Special purpose function for populating ComboBox's with space ids and labels.

Returns
Array
hotspot()method 
public function hotspot(xml:XML):Hotspot

creates a hotspot. not to be called directly. in the descriptor XML, a 'hotspot' node will cause this to be called. note that a hotspot is only a special Plane which points toward the origin (where the camera is unless you move it).

Parameters
xml:XML

Returns
Hotspot
keyDown()method 
public function keyDown(direction:String):void

key down event handler

Parameters
direction:String
keyDownEvent()method 
protected function keyDownEvent(event:KeyboardEvent):void

key handler for camera interaction

Parameters
event:KeyboardEvent
keyUp()method 
public function keyUp(direction:String):void

key up event handler

Parameters
direction:String
keyUpEvent()method 
protected function keyUpEvent(event:KeyboardEvent):void

key up camera interaction handler.

Parameters
event:KeyboardEvent
loadSpace()method 
public function loadSpace(name:String):void

initiates the loading of a new space.

Parameters
name:String — A String with the name of the space in the descriptor XML to load.
mouseDownEvent()method 
protected function mouseDownEvent(event:MouseEvent):void

mouse down handler for camera interaction

Parameters
event:MouseEvent
mouseUpEvent()method 
protected function mouseUpEvent(event:Event):void

mouse up camera interaction handler

Parameters
event:Event
mouseWheelEvent()method 
protected function mouseWheelEvent(event:MouseEvent):void

mouse wheel handler for camera interaction

Parameters
event:MouseEvent
movieHotspot()method 
public function movieHotspot(xml:XML):Hotspot

creates a movie hotsport. Will be called automatically by hotspot if the asset url ends in '.swf'. It can be called directly with a movieHotspot node in the XML.

Parameters
xml:XML

Returns
Hotspot
openURL()method 
public function openURL(url:String, window:String = "_blank"):void

opens a URL in the browser

Parameters
url:String — String value of the absolute URL to open
 
window:String (default = "_blank") — String value of browser window name to open, defaults to '_blank'
plane()method 
public function plane(xml:XML):Plane

creates a plane. not to be called directly. in the descriptor XML, a 'plane' node will cause this to be called.

Parameters
xml:XML

Returns
Plane
qtvr()method 
public function qtvr(xml:XML):Cube

creates a qtvr. not to be called directly. in the descriptor XML, a 'qtvr' node will cause this to be called.

Parameters
xml:XML

Returns
Cube
removeLastSpace()method 
public function removeLastSpace():void

removes the last loaded space, if applicable

restartAutorotatorTimer()method 
public function restartAutorotatorTimer(delay:Number = 15000):void

handles restarting the autorotator timer

Parameters
delay:Number (default = 15000)
sphere()method 
public function sphere(xml:XML):Object

creates a sphere. not to be called directly. in the descriptor XML, a 'sphere' node will cause this to be called.

Parameters
xml:XML

Returns
Object
stageReady()method 
public function stageReady(e:Event):void

stage ready is called when ModuleLoader has added PanoSalado to the stage. This is where PanoSalado sets stage properties: framerate quality and a resize event.

Parameters
e:Event
startAutorotatorNow()method 
public function startAutorotatorNow(e:TimerEvent = null):void

immediately starts camera autorotation

Parameters
e:TimerEvent (default = null)
stopAutorotatorNow()method 
public function stopAutorotatorNow():void

immediately stops camera autorotation

toggleAutorotator()method 
public function toggleAutorotator():void

toggles autorotator. if toggled on, it will start autorotation immediately.

toggleFullscreen()method 
public function toggleFullscreen():void

fullscreen toggle function. dispatches BroadcastEvent.ENTER_FULLSCREEN and EXIT_FULLSCREEN

tween()method 
public function tween(str:String):void

parsers a String tween from the XML, deprecated, and SpinControl will only use XML tweens

Parameters
str:String

See also

tweenXML
tweenXML()method 
public function tweenXML(str:String):void

parses an XML tween from the XML

Parameters
str:String