Shawnblais.com v2

The Lab

3D Flip Gallery v0.1 (Cover Flow)

with 5 comments

This was pretty much my first real attempt at a PV3D project. Using an AS2 Cover Flow implementation as my target, I began redesigning it completely from scratch. The process was extremely enlightening, I learned a ton about both As3 and Papervsion, and I really think the end result is one of the best implementations I’ve seen. It’s extremely smooth, and able to handle upwards of 100 images with great performance.

Example usage:

flipGallery = new FlipGallery(1150, 540, 350, 350);
flipGallery.reflectionRatio = .25;
/* Position and add to stage */
flipGallery.y = 25;
addChildAt(flipGallery, 1);
/* Load thumbs, and transition in */
flipGallery.loadThumbs(aImages);

flipGallery = new FlipGallery(sceneWidth, sceneHeight, thumbWidth, thumbHeight);
flipGallery.loadThumbs(aImages);  //Where aImages is an array of asset objects, with at least assetSrc and assetType properties.

Some additional configuration options include:

  • flipGallery.xSpacing  :  Hz spacing/overlap
  • flipGallery.zSpacing  : Distance between each subsequent background thumb
  • flipGallery.rotationAmount  :  Y rotation of thumbs when not selected
  • flipGallery.reflectionFramerate  :  Framerate that the reflection clip will run at
  • flipGallery.reflectionAlpha  :  Max alpha of reflection gradient mask
  • flipGallery.reflectionRatio  :  Percentage height of reflection, relative to thumb height

AssetTypes Supported

  • Image Files (png, gif, jpg)
  • External SWF
  • Embedded MovieClip
  • Video Files (f4v, flv)

The video playback is spotty, and would definately need some further refinement. Use with caution!

Also,  all assets links are hardcoded into the FLA itself, my goal here was to learn about PV3D and I didn’t want to spend time implementing any sort of XML based input.

View Example

Download Source

Written by Shawn

August 19th, 2009 at 10:36 am

Posted in Uncategorized

5 Responses to '3D Flip Gallery v0.1 (Cover Flow)'

Subscribe to comments with RSS or TrackBack to '3D Flip Gallery v0.1 (Cover Flow)'.

  1. [...] Click here to read more… [...]

  2. Looks alright, but I got an actionscript error when I clicked next before the preloader finished.

    TypeError: Error #1010: A term is undefined and has no properties.
    at com.shawnblais.modules::FlipGallery/selectThumb()
    at com.shawnblais.modules::FlipGallery/next()
    at MethodInfo-1432()

    Kirill

    20 Aug 09 at 5:19 pm

  3. Also if I click on the main image then everything changes perspective (not sure if that was intended, but there’s no way to restore the perspective). Subsequently clicking on the the main image makes it shift left. I can continue doing so until it finally leaves the screen.

    Kirill

    20 Aug 09 at 5:28 pm

  4. Ya, as I said the ‘detail view’ is not really implemented, so a person would either need to implement their own, or just disable the onPress functionality for the planes. I guess I should just remove it for now.

    Thanks for the feedback.

    admin

    20 Aug 09 at 10:10 pm

  5. I’ve updated the source and example to fix the error on the next button, and also removed the half-finished functionality for the Detail view.

    admin

    22 Aug 09 at 12:29 am

Leave a Reply

Spam Protection by WP-SpamFree