Flex book component (beta)

by Ruben

So here it is, the beta version of my Flex Book component. The source-code is included and free for all of you to look into (mind that it is licenced under a Creative Commons licence).

Demo
Source
Documentation

UPDATE: I also created a simpe demo to demonstrate the simplicity of using the Book classes, you can view/download it here:
Simple demo
Simple demo source

There are still a few performance-optimalisations to be made, so I welcome any (constructive) feedback on the Book component. If you spot any bugs or possibilities for optimalisation then please send me an email (my email-address can be found on the contact-page).
If you have any feedback other than bug-reports and suggestions for optimalisation, then please post them in the comments.

In the next week I will hopefully put up a simple demo as well to point out the simplicity of the usage of the Book component.

FEATURES
These are the main features of the component:

  • Pageflip effect (not kidding ;))
  • Hardback option for every page, as well as a hardcover option for the containing book, automatically making the first and last pages hardback.
  • Functionality for tearing pages out of the containing book.
  • Methods allowing automatically flipping through the pages of a book ( gotopage() ).
  • Customizable easing, auto-pageflip duration, and size for the hit-regions (the page-corners whereby a page can be flipped).
  • Distortion (instead of skewing) when flipping hardback pages.
  • A variety of events that the book class dispatches, making customization alot simpler.
  • Transparency support for pages.
  • Live-bitmapping functionality for playing animation uninterrupted during pageflips.
  • Locking functionality to keep certain pages from being flipped.

CREDITS

After the first (alpha) release of the Book classes, some suggested that I ought to give credit to my sources of inspiration.
So hereby I give credit for inspiration to every book I have ever read in my life, flipping through your pages was just amazing.

If I would have to give inspirational credits to any earlier version of the pageflip effect then I would give credit to the one that Eric Natzke did for DreamWorks, which is the first I ever saw (years and years ago).

KNOWN BUGS AND ISSUES

  • For Book instances, height values greater than the height of the content may slow down the application.
  • ScrollPolicies for Page instances are disabled (the properties have been overridden and are idle in the Page class). When a Page instance is not being flipped, its fold-gradient is drawn upon a Shape instance stored within that Page its rawChildren. When scrollbars are displayed, the Shape instance will no longer be in place.
  • When a Book instance without any children is initialized a RangeError is thrown. I will look into this issue, in the meanwhile you may want to use the following workaround; Put two child Page instances in the Book instance, then (from withinin the creationComplete property of the Book instance) remove the two dummy-children by using the removeChild() method.