Packagecom.rubenswieringa.book
Classpublic class Page
InheritancePage Inheritance mx.containers.Canvas

A container class that stores contents of a page in the Book class.

See also

Book


Public Properties
 PropertyDefined by
  book : Book
[read-only] Book instance with which this Page is associated.
Page
  explicitHard : Boolean
[read-only] Returns the hard option for this Page only, where the hard property returns true if either this Page or its flipside is hard.
Page
  explicitTearable : Boolean
[read-only] Returns the tearable option for this Page only, where the tearable property returns true if either this Page or its flipside is tearable.
Page
  hard : Boolean
Indicates whether or not this Page should be hard (true) or flexible (false).
Page
  index : int
[write-only] Index of this Page within the pages property of the containing Book instance.
Page
  liveBitmapping : Boolean
Indicates whether or not this Page plays animation while being flipped.
Page
  lock : Boolean = false
If true, this Page can not be flipped over.
Page
  side : int
[write-only] int indicating on which side the Page is displayed (0=left, 1=right).
Page
  tearable : Boolean
Indicates whether or not this Page should be allowed to be be torn from its Book, false if not.
Page
Public Methods
 MethodDefined by
  
Page()
Constructor
Page
  
Erases the gradient on the folding-side of the page.
Page
  
Draws a gradient on the folding-side of the page.
Page
  
getBitmapData():BitmapData
Draws itself on a BitmapData instance and returns it.
Page
  
Returns the Page instance that is displayed on the other side of this Page.
Page
  
Hides fold-gradient.
Page
  
isFirstPage():Boolean
Returns true if this is the first Page in the Book it belongs to, false otherwise.
Page
  
isLastPage():Boolean
Returns true if this is the last Page in the Book it belongs to, false otherwise.
Page
  
refreshFoldGradient(includeFlipSide:Boolean = true):void
Erase or draw fold gradient for this Page and the Page on the flipside (if includeFlipSide is true).
Page
  
Shows fold-gradient.
Page
  
tear(fromTop:Boolean = true):void
Tears this Page instance out of its corresponding Book.When called, this method will be executed regardless of the tearable property its value.
Page
Public Constants
 ConstantDefined by
  LEFT : uint = 0
[static]
Page
  RIGHT : uint = 1
[static]
Page
Property detail
bookproperty
book:Book  [read-only]

Book instance with which this Page is associated. Can only be set once.

Implementation
    public function get book():Book

See also

explicitHardproperty 
explicitHard:Boolean  [read-only]

Returns the hard option for this Page only, where the hard property returns true if either this Page or its flipside is hard. Unless you're modifying this class you will most likely not need to use this property.

The default value is false.

Implementation
    public function get explicitHard():Boolean

See also

explicitTearableproperty 
explicitTearable:Boolean  [read-only]

Returns the tearable option for this Page only, where the tearable property returns true if either this Page or its flipside is tearable. Unless you're modifying this class you will most likely not need to use this property.

The default value is false.

Implementation
    public function get explicitTearable():Boolean

See also

hardproperty 
hard:Boolean  [read-write]

Indicates whether or not this Page should be hard (true) or flexible (false). Defaults to false. Returns true if either this Page or the flipside Page has is hard..

The default value is false.

Implementation
    public function get hard():Boolean
    public function set hard(value:Boolean):void

See also

indexproperty 
index:int  [write-only]

Index of this Page within the pages property of the containing Book instance.

This property can be used as the source for data binding.

Implementation
    public function set index(value:int):void

See also

liveBitmappingproperty 
liveBitmapping:Boolean  [read-write]

Indicates whether or not this Page plays animation while being flipped. Note that enabling liveBitmapping may result in decreased performance.

The default value is false.

Implementation
    public function get liveBitmapping():Boolean
    public function set liveBitmapping(value:Boolean):void

See also

lockproperty 
public var lock:Boolean = false

If true, this Page can not be flipped over.

The default value is false.

sideproperty 
side:int  [write-only]

int indicating on which side the Page is displayed (0=left, 1=right).

This property can be used as the source for data binding.

Implementation
    public function set side(value:int):void

See also

tearableproperty 
tearable:Boolean  [read-write]

Indicates whether or not this Page should be allowed to be be torn from its Book, false if not. Defaults to false. Returns true if either this Page or its flipside Page has is tearable, or if the Book associated with this Page has its tearable property set to true. Note that even if a Page has its tearable property set to false, it can still be torn out of its Book with the tear() or tearPage() methods. This property merely indicates whether or not tearing can be achieved by dragging the page-corner manually.

The default value is false.

Implementation
    public function get tearable():Boolean
    public function set tearable(value:Boolean):void

See also

Constructor detail
Page()constructor
public function Page()

Constructor

Method detail
clearFoldGradient()method
public function clearFoldGradient():void

Erases the gradient on the folding-side of the page.

drawFoldGradient()method 
public function drawFoldGradient():void

Draws a gradient on the folding-side of the page.

getBitmapData()method 
public function getBitmapData():BitmapData

Draws itself on a BitmapData instance and returns it.

Returns
BitmapData — BitmapData
getFlipSide()method 
public function getFlipSide():Page

Returns the Page instance that is displayed on the other side of this Page.

Returns
Page — Page
hideFoldGradient()method 
public function hideFoldGradient():void

Hides fold-gradient.

isFirstPage()method 
public function isFirstPage():Boolean

Returns true if this is the first Page in the Book it belongs to, false otherwise.

Returns
Boolean — Boolean indicating whether or not the Page is the first in line
isLastPage()method 
public function isLastPage():Boolean

Returns true if this is the last Page in the Book it belongs to, false otherwise.

Returns
Boolean — Boolean indicating whether or not the Page is the last in line
refreshFoldGradient()method 
public function refreshFoldGradient(includeFlipSide:Boolean = true):void

Erase or draw fold gradient for this Page and the Page on the flipside (if includeFlipSide is true).

Parameters
includeFlipSide:Boolean (default = true) — Boolean indicating whether or not to draw the fold-gradient for this Page its flipside.
showFoldGradient()method 
public function showFoldGradient():void

Shows fold-gradient.

tear()method 
public function tear(fromTop:Boolean = true):void

Tears this Page instance out of its corresponding Book.When called, this method will be executed regardless of the tearable property its value.

Parameters
fromTop:Boolean (default = true) — If true, the Page will be torn out by its upper outer corner, if false by its lower outer corner.

Throws
— Gets thrown when page is an index-value and out of bounds.

See also

Constant detail
LEFTconstant
public static const LEFT:uint = 0
RIGHTconstant 
public static const RIGHT:uint = 1