| Package | com.rubenswieringa.book |
| Class | public class Book |
| Inheritance | Book PageManager mx.containers.Canvas |
See also
| Property | Defined by | ||
|---|---|---|---|
| autoFlipDuration : uint = 1000
The time (milliseconds) it takes to finish a pageflip performed by the gotoPage method.
| Book | ||
![]() | currentPage : int
Index of the current left-hand page (-1 if the Book is unopened).
| PageManager | |
| easing : Number
The precision with which the page-corner follows the mouse during a pageflip.
| Book | ||
| flipOnClick : Boolean = true
Whether or not the page should be turned when a page corner is clicked.
| Book | ||
| hardCover : Boolean
If true, the first and last Pages in this Book will be hard, regardless of the value of their own hard properties.
| Book | ||
| hardPerspective : uint = 45
Amount of perspective in a pageflip of a Page that has its hard property set to true.
| Book | ||
| hover : Boolean
Set this property to false if the four outer page-corners should not display a subtle flip-effect on mouse-over.
| Book | ||
| liveBitmapping : Boolean = false
Indicates whether or not this Book plays animation while flipping one of its Pages.
| Book | ||
![]() | openAt : int
Index of the Page at which the Book is opened at startup, can only be set once, and only at startup.
| PageManager | |
![]() | pages : ArrayCollection
Array of all respective Pages in this Book instance.
| PageManager | |
| regionSize : uint
Size of the hit-regions in the pagecorners.
| Book | ||
| sideFlip : Boolean = true
Whether or not the outer side of a Page can be used to let it flip.
| Book | ||
| snap : Boolean = false
If true, no easing will be applied during pageflips.
| Book | ||
| status : String [write-only]
Current status of the Book.
| Book | ||
| tearable : Boolean = false
If true, all Pages will have tearing enabled.
| Book | ||
| Method | Defined by | ||
|---|---|---|---|
|
Book()
Constructor.
| Book | ||
![]() |
addChild(child:DisplayObject):DisplayObject
Adds a child Page instance to this PageManager instance.
| PageManager | |
![]() |
addChildAt(child:DisplayObject, index:int):DisplayObject
Adds a child Page instance to this PageManager instance at the index position specified.
| PageManager | |
|
cancelGotoPage(finishFlip:Boolean = true):void
Aborts a pageflip started by the gotoPage method.
| Book | ||
![]() |
contains(child:DisplayObject):Boolean
Determines whether the specified display object is a child of the PageManager instance or the instance itself.
| PageManager | |
![]() |
getChildByName(name:String):DisplayObject
Returns the child display object that exists with the specified name.
| PageManager | |
![]() |
getChildIndex(child:DisplayObject):int
Returns the index position of a child Page instance.
| PageManager | |
![]() |
getChildren():Array
Returns an Array of Page objects consisting of the content children of the container.
| PageManager | |
|
getLastFlippedCorner():Point
Returns a Point instance indicating the corner that was last flipped.
| Book | ||
![]() |
getObjectsUnderPoint(point:Point):Array
Returns an array of objects that lie under the specified point and are children (or grandchildren, and so on) of this PageManager instance.
| PageManager | |
|
gotoPage(page:*, cancelable:Boolean = true):void
Performs a pageflip without the user having to drag the pagecorner.
| Book | ||
|
nextPage():void
Performs a pageflip to the next page, without the user having to drag the pagecorner.
| Book | ||
![]() |
owns(child:DisplayObject):Boolean
Returns true if the chain of owner properties points from child to this PageManager.
| PageManager | |
|
prevPage():void
Performs a pageflip to the previous page, without the user having to drag the pagecorner.
| Book | ||
![]() |
removeAllChildren():void
Removes all children (Page instances) from the child list of this container.
| PageManager | |
![]() |
removeChild(child:DisplayObject):DisplayObject
Removes a child Page from the child list of this Container.
| PageManager | |
![]() |
removeChildAt(index:int):DisplayObject
Removes a child Page from the child list of this Container at the specified index.
| PageManager | |
![]() |
setChildIndex(child:DisplayObject, newIndex:int):void
Changes the position of an existing child in the PageManager container.
| PageManager | |
|
Swaps the position of two Page instances in the PageManager.
| Book | ||
![]() |
swapChildrenAt(index1:int, index2:int):void
Swaps the position of two Page instances in the PageManager at the specified indexes.
| PageManager | |
|
tearPage(page:*, fromTop:Boolean = true):void
Tears a Page out of this Book instance.
| Book | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched at the same time as the page-turned Event, when the Book was previously open, and the first or last Page was flipped successfully. | Book | |||
| Dispatched at the same time as the page-turned Event, when the Book was previously closed, and the first or last Page was flipped successfully. | Book | |||
![]() | Dispatched when a page is added to or removed from the PageManager. | PageManager | ||
| Dispatched when the corner of a page is rolled out of with the mouse. | Book | |||
| Dispatched when a page falls back in place after being rolled over with the mouse. | Book | |||
| Dispatched when the corner of a page is rolled over with the mouse. | Book | |||
| Dispatched when the user releases the corner of a page. | Book | |||
| Dispatched when a page falls in place after being flipped. | Book | |||
| Dispatched when the user picks up the corner of a page. | Book | |||
| Dispatched when a pageflip is not successful. | Book | |||
| Dispatched when a Page is torn out of its Book. | Book | |||
| Dispatched when a pageflip is successful. | Book | |||
| Dispatched at the same time as the page-turned Event, when the Book was previously open, and the first or last Page was flipped successfully. | Book | |||
| autoFlipDuration | property |
public var autoFlipDuration:uint = 1000The time (milliseconds) it takes to finish a pageflip performed by the gotoPage method. The calculated speed will also be used for tearing out Pages.
The default value is 1000.
See also
| easing | property |
easing:Number [read-write]The precision with which the page-corner follows the mouse during a pageflip. Values range from 0 (no easing) to 1 (heavy easing).
The default value is 0.7.
public function get easing():Number
public function set easing(value:Number):void
| flipOnClick | property |
public var flipOnClick:Boolean = trueWhether or not the page should be turned when a page corner is clicked.
The default value is true.
| hardCover | property |
hardCover:Boolean [read-write]If true, the first and last Pages in this Book will be hard, regardless of the value of their own hard properties.
The default value is true.
public function get hardCover():Boolean
public function set hardCover(value:Boolean):void
| hardPerspective | property |
public var hardPerspective:uint = 45Amount of perspective in a pageflip of a Page that has its hard property set to true. This value is used as the maximum with which the outer side of a page is extended on both sides (upper and lower) during a hard pageflip.
The default value is 45.
| hover | property |
hover:Boolean [read-write]Set this property to false if the four outer page-corners should not display a subtle flip-effect on mouse-over. Note that Pages with their hard property set to true do not display hover-effects at all.
The default value is true.
public function get hover():Boolean
public function set hover(value:Boolean):void
| liveBitmapping | property |
public var liveBitmapping:Boolean = falseIndicates whether or not this Book plays animation while flipping one of its Pages. When this property is set to true, all Page instances will return true from their liveBitmapping property. Note that enabling liveBitmapping may result in decreased performance.
The default value is false.
See also
| regionSize | property |
regionSize:uint [read-write]Size of the hit-regions in the pagecorners.
The default value is 150.
public function get regionSize():uint
public function set regionSize(value:uint):void
| sideFlip | property |
public var sideFlip:Boolean = trueWhether or not the outer side of a Page can be used to let it flip.
The default value is true.
| snap | property |
public var snap:Boolean = falseIf true, no easing will be applied during pageflips.
The default value is false.
See also
| status | property |
status:String [write-only]Current status of the Book.
This property can be used as the source for data binding.
Implementation public function set status(value:String):void
See also
| tearable | property |
public var tearable:Boolean = falseIf true, all Pages will have tearing enabled.
The default value is false.
See also
| Book | () | constructor |
public function Book()Constructor.
| cancelGotoPage | () | method |
public function cancelGotoPage(finishFlip:Boolean = true):voidAborts a pageflip started by the gotoPage method.
ParametersfinishFlip:Boolean (default = true) — Boolean indicating whether or not to allow the auto-flip to finish. When true, the pageflip will finish. When false, the auto-flip will immediately stop, and the page corner will start sticking to the mouse.
|
See also
| getLastFlippedCorner | () | method |
public function getLastFlippedCorner():PointReturns a Point instance indicating the corner that was last flipped.
ReturnsPoint — Point
|
| gotoPage | () | method |
public function gotoPage(page:*, cancelable:Boolean = true):voidPerforms a pageflip without the user having to drag the pagecorner.
Parameterspage:* — int/uint or Page, indicating the index or instance of a Page.
|
|
cancelable:Boolean (default = true) — Indicates whether or not this auto-flip should allow cancelGotoPage to be called.
|
— Gets thrown when the child parameter is not an instance of the Page class nor a int/uint.
|
|
— Gets thrown when the child parameter is not a child of this Book.
|
See also
| nextPage | () | method |
public function nextPage():voidPerforms a pageflip to the next page, without the user having to drag the pagecorner.
See also
| prevPage | () | method |
public function prevPage():voidPerforms a pageflip to the previous page, without the user having to drag the pagecorner.
See also
| swapChildren | () | method |
public override function swapChildren(child1:DisplayObject, child2:DisplayObject):voidSwaps the position of two Page instances in the PageManager.
Parameterschild1:DisplayObject — The first child object.
|
|
child2:DisplayObject — The second child object.
|
| tearPage | () | method |
public function tearPage(page:*, fromTop:Boolean = true):voidTears a Page out of this Book instance. When called, this method will be executed regardless of the value of the Page its tearable property. Fails silently if the provided Page is not one of the currently visible Pages.
Parameterspage:* — int/uint or Page, indicating the index or instance of a Page to be torn out of this Book.
|
|
fromTop:Boolean (default = true) — If true, the Page will be torn out by its upper outer corner, if false by its lower outer corner.
|
— Gets thrown when page is an index-value and out of bounds.
|
See also
| bookClosed | event |
com.rubenswieringa.book.BookEvent
Dispatched at the same time as the page-turned Event, when the Book was previously open, and the first or last Page was flipped successfully.
See also
| bookOpened | event |
com.rubenswieringa.book.BookEvent
Dispatched at the same time as the page-turned Event, when the Book was previously closed, and the first or last Page was flipped successfully.
See also
| hoverEnding | event |
com.rubenswieringa.book.BookEvent
Dispatched when the corner of a page is rolled out of with the mouse. Note that this Event is dispatched just before the page starts falling back in place. Only applicable if the hover property is set to true.
See also
| hoverFinished | event |
com.rubenswieringa.book.BookEvent
Dispatched when a page falls back in place after being rolled over with the mouse. Only applicable if the hover property is set to true.
See also
| hoverStarted | event |
com.rubenswieringa.book.BookEvent
Dispatched when the corner of a page is rolled over with the mouse. Only applicable if the hover property is set to true.
See also
| pageflipEnding | event |
com.rubenswieringa.book.BookEvent
Dispatched when the user releases the corner of a page. Note that this Event is dispatched just before the page starts falling in place.
See also
| pageflipFinished | event |
com.rubenswieringa.book.BookEvent
Dispatched when a page falls in place after being flipped. This Event is dispatched regardless of whether or not the page has been turned, or has fallen back into its original position.
See also
| pageflipStarted | event |
com.rubenswieringa.book.BookEvent
Dispatched when the user picks up the corner of a page.
See also
| pageNotTurned | event |
com.rubenswieringa.book.BookEvent
Dispatched when a pageflip is not successful.
See also
| pageTorn | event |
com.rubenswieringa.book.BookEvent
Dispatched when a Page is torn out of its Book.
| pageTurned | event |
com.rubenswieringa.book.BookEvent
Dispatched when a pageflip is successful.
See also
| statusChanged | event |
com.rubenswieringa.book.BookEvent
Dispatched at the same time as the page-turned Event, when the Book was previously open, and the first or last Page was flipped successfully.
See also