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 view port dimension has changed.
ViewPort
  height : int
The height of the view port.
ViewPort
  height2 : int
[read-only]
ViewPort
  ratio : Number
[read-only] The width/height ratio of the view port.
ViewPort
  width : int
The width of the view port.
ViewPort
  width2 : int
[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
Public Constants
 ConstantDefined by
  offset : Point
A point representing the offset to change the view port center.
ViewPort
Property detail
hasChangedproperty
public var hasChanged:Boolean = false

Flag which specifies if the view port dimension has changed.

heightproperty 
height:int  [read-write]

The height of the view port.

Implementation
    public function get height():int
    public function set height(value:int):void
height2property 
height2:int  [read-only]Implementation
    public function get height2():int
ratioproperty 
ratio:Number  [read-only]

The width/height ratio of the view port.

Implementation
    public function get ratio():Number
widthproperty 
width:int  [read-write]

The width of the view port.

Implementation
    public function get width():int
    public function set width(value:int):void
width2property 
width2:int  [read-only]Implementation
    public function get width2():int
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.

Constant detail
offsetconstant
public const offset:Point

A point representing the offset to change the view port center.

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).