Packagesandy.view
Classpublic final class ViewPort

The view port represents the rendered screen.

This is the area where the view of the camera is projected.
It may be the whole or only a part of the stage



Public Properties
 PropertyDefined by
  hasChanged : Boolean = false
Flag which specifies if the viewport dimension has changed
ViewPort
  height : Number
ViewPort
  height2 : Number
[read-only]
ViewPort
  offset : Point
Offset to change the viewport center.
ViewPort
  ratio : Number
[read-only]
ViewPort
  width : Number
ViewPort
  width2 : Number
[read-only]
ViewPort
Public Methods
 MethodDefined by
  
ViewPort(p_nW:Number, p_nH:Number)
Creates a new ViewPort.
ViewPort
  
update():void
Updates the view port
ViewPort
Property detail
hasChangedproperty
public var hasChanged:Boolean = false

Flag which specifies if the viewport dimension has changed

heightproperty 
height:Number  [read-write]Implementation
    public function get height():Number
    public function set height(value:Number):void
height2property 
height2:Number  [read-only]Implementation
    public function get height2():Number
offsetproperty 
public var offset:Point

Offset to change the viewport center. For example, if you set myCamera.viewport.offset.y to 100, everything drawn at the screen will be moved 100 pixels down (due to Flash vertical axis convention).

ratioproperty 
ratio:Number  [read-only]Implementation
    public function get ratio():Number
widthproperty 
width:Number  [read-write]Implementation
    public function get width():Number
    public function set width(value:Number):void
width2property 
width2:Number  [read-only]Implementation
    public function get width2():Number
Constructor detail
ViewPort()constructor
public function ViewPort(p_nW:Number, p_nH:Number)

Creates a new ViewPort.

Parameters
p_nW:Number — The width of the rendered screen
 
p_nH:Number — The height of the rendered screen
Method detail
update()method
public function update():void

Updates the view port