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).
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
- Didier Brun for making his pageflip rendering class.
- Thomas Pfeiffer (aka Kiroukou) for letting me use his distortion class.
- the Factor.e for allowing me to publish the demo and the source-code..
- Maikel Sibbald for helping me with (among a lot of things) thinking out the structure of this component. He also made a usage-example of Didier's pageflip class which I used as reference in the early days of the Book class..
- Theo Aartsma (aka Sumeco) for letting me use his artwork in the Book demo..
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.

Comments (read older or newer, or show 36 trackbacks)
Trackbacks:
hi dude, by far this Flex book is the best flex component around. I think you should work on something else to bring out more creative components.
@Brenda: Thank you very much.
At this stage the Book component is targeted at Flex developers. However, A few days ago I had a conversation with an employee at a large advertising-agency in which we discussed that it might be cool to have some sort of wizard which would enable people with no knowledge about Flex (or Flash) to put together their own Book implementation.
Creating such a tool might take some time though, and I’m still not even sure if this is going to be one of my priorities in the near future, so don’t get your hopes up too much
@Moxie: Thanks! In what way precisely do you mean that I should work on “something else” to bring out more creative components?
Interesting. I saw flex book component developed by Ely Greenfield nearly three months ago, with a bunch of examples and sources. Have you seen it?
Yes, I did see Ely’s FlexBook component, I especially liked the sample with the human anatomy pages..
Ok let me start out by saying I love your flex book and I am glad to know that your source code is free. But I am totally lost now, in order to use this on my website what goes where and how do I add my own pictures to every page??
Is there parts that go in the header tags, parts that go in between the body tags ect.
I wish this was a simple flash thing that I could just edit to put my own pictures in and then just insert the flash applet or whatever into the web brower, but such isnot the case I am sure, any help you can give me would be appreciated