Archive for September, 2008

Flex Large Book Component

September 10th, 2008 3 comments

I needed a book control for an AIR app and the best that suited my needs was Ruben Swieringa’s Flex Book component (many thanks for building this). I had to use this for a 200+ page magazine and I quickly discovered that it worked a little slow for this amount of pages. After a profiling session I realized that what took so long was the Flash pre-render time because all the pages are in the display list (one on top of another). So I wrote a some code to use only 8 pages (4 pairs): the rest are stored in an array. I also added a jumpToPage method to make navigation easier in a 200+ page book.

Still to be done:

  • if you have more than one transparent page one after another it will look very messy because at any given moment the book has only 8 pages. This can be done by configuring how many real pages are stored … but the logic of navigating through get’s very nasty.
  • tearing pages doesn’t work (not implemented yet)
  • lot of traces are still enabled
  • BEWARE of bugs :)

Give it a try:


Categories: flex Tags: