Packagenet.flashpunk
Classpublic class Screen
InheritanceScreen Inheritance Object

Container for the main screen buffer. Can be used to transform the screen.



Public Properties
 PropertyDefined By
  angle : Number
Rotation of the screen, in degrees.
Screen
  color : uint
Refresh color of the screen.
Screen
  height : uint
[read-only] Height of the screen.
Screen
  mouseX : int
[read-only] X position of the mouse on the screen.
Screen
  mouseY : int
[read-only] Y position of the mouse on the screen.
Screen
  originX : int
X origin of transformations.
Screen
  originY : int
Y origin of transformations.
Screen
  scale : Number
Scale factor of the screen.
Screen
  scaleX : Number
X scale of the screen.
Screen
  scaleY : Number
Y scale of the screen.
Screen
  smoothing : Boolean
Whether screen smoothing should be used or not.
Screen
  width : uint
[read-only] Width of the screen.
Screen
  x : int
X offset of the screen.
Screen
  y : int
Y offset of the screen.
Screen
Public Methods
 MethodDefined By
  
Constructor.
Screen
  
Captures the current screen as an Image object.
Screen
  
redraw():void
Redraws the screen.
Screen
  
refresh():void
Refreshes the screen.
Screen
  
resize():void
Initialise buffers to current screen size.
Screen
  
swap():void
Swaps screen buffers.
Screen
Property Detail
angleproperty
angle:Number

Rotation of the screen, in degrees.


Implementation
    public function get angle():Number
    public function set angle(value:Number):void
colorproperty 
color:uint

Refresh color of the screen.


Implementation
    public function get color():uint
    public function set color(value:uint):void
heightproperty 
height:uint  [read-only]

Height of the screen.


Implementation
    public function get height():uint
mouseXproperty 
mouseX:int  [read-only]

X position of the mouse on the screen.


Implementation
    public function get mouseX():int
mouseYproperty 
mouseY:int  [read-only]

Y position of the mouse on the screen.


Implementation
    public function get mouseY():int
originXproperty 
originX:int

X origin of transformations.


Implementation
    public function get originX():int
    public function set originX(value:int):void
originYproperty 
originY:int

Y origin of transformations.


Implementation
    public function get originY():int
    public function set originY(value:int):void
scaleproperty 
scale:Number

Scale factor of the screen. Final scale is scaleX scale by scaleY scale, so you can use this factor to scale the screen both horizontally and vertically.


Implementation
    public function get scale():Number
    public function set scale(value:Number):void
scaleXproperty 
scaleX:Number

X scale of the screen.


Implementation
    public function get scaleX():Number
    public function set scaleX(value:Number):void
scaleYproperty 
scaleY:Number

Y scale of the screen.


Implementation
    public function get scaleY():Number
    public function set scaleY(value:Number):void
smoothingproperty 
smoothing:Boolean

Whether screen smoothing should be used or not.


Implementation
    public function get smoothing():Boolean
    public function set smoothing(value:Boolean):void
widthproperty 
width:uint  [read-only]

Width of the screen.


Implementation
    public function get width():uint
xproperty 
x:int

X offset of the screen.


Implementation
    public function get x():int
    public function set x(value:int):void
yproperty 
y:int

Y offset of the screen.


Implementation
    public function get y():int
    public function set y(value:int):void
Constructor Detail
Screen()Constructor
public function Screen()

Constructor.

Method Detail
capture()method
public function capture():Image

Captures the current screen as an Image object.

Returns
Image — A new Image object.
redraw()method 
public function redraw():void

Redraws the screen.

refresh()method 
public function refresh():void

Refreshes the screen.

resize()method 
public function resize():void

Initialise buffers to current screen size.

swap()method 
public function swap():void

Swaps screen buffers.