Skip to Content »

Tech Life of Recht » archive for October, 2006

 Flash pageflip with Javascript integration

  • October 24th, 2006
  • 10:15 pm

For one of my latest projects, I had to implement a image viewer where the images are laid out like pages in a book, and where you can then flip the pages, also like in a book. Please don’t ask me why in the world anybody thinks that’s a good idea…
Anyway, after fiddling a little with pure Javascript, I abandoned the idea, primarily because it’s close to impossible to achieve the right look without the ability to rotate images. This is where I found the excellent PageFlip by Macc, a Flash file which can be programmed to do exactly what I wanted. However, Flash is not exactly my strong side, so I wanted to be able to customize the pages without generating a new Flash file. Again, I was lucky, because somebody had already modified the Flash file to read images from xml. Sweet. Only one problem left: Styling of prev/next/goto. And this is where I had to do some work myself:

I modified the flash so that it sends out two events, onPageChange and onFlashLoaded, to JavaScript. Combined with SWFObject, it’s possible to control the page flipping entirely through Javascript. I then removed the controls from the Flash file itself, and now I have the completely customizable page flipping solution.

The bonus: You can have it too, or you can just take a look at the demo.

Now I’m off to make a GWT app for creating new configurations based on a PDF file.

 JAOO 2006 gone

  • October 6th, 2006
  • 11:38 am

The JAOO conference is over, and I’m back at work. It was 3 days of sessions, talking, and booth-attending. As usual, the speakers were of high quality, especially Alistair Cockburn, Bruce Johnson, and Erik Meijer.

This year’s JAOO was a little different from the last couple of conferences which I’ve attended in that I didn’t experience the feeling of “Wow – I’ve got to go home and try that!” – although Erik Meijer hit a soft spot with Haskell. On the other hand, JAOO was more intimate than for example JavaONE, and even though there weren’t the great technical revelations, I definitely learned something, and I’m already looking forward to next year.