The DisplayShelf component demonstrates using a number of flex and flash concepts to provide a rich, templatable control to display a faux-3d view of a list of items. Its behavior is similar to the CoverFlow visualization added to iTunes in version 7.

The sample is broken into two pieces. The first, the TiltingPane component, takes any content and wraps it in a faux ‘3d’ effect, allowing you to tilt it from side to side. The second, the DisplayShelf component, uses the TiltingPane component to render a list of items along a virtual shelf, with the selected item pulled out for display.

Some of the concepts this sample illustrates:

  • matrix transformations
  • graphics API
  • masking
  • bitmap manipulation
  • templating
  • item renderers
  • the IList interface
  • implementing dataProviders
  • effective animation

This sample was the centerpiece from my MAX 2006 presentation, “Flex under the hood: A tour through the Flex architecture.”

Try a demo here:

DisplayShelf browser sample

Interested in seeing how the 3D effect works? You can see how it gets built, one step at a time, with an interactive walkthrough here:

Interactive 3D Walkthrough

The source, as always, is available under the MIT open source license, so you can do whatever zany thing you crazy kids want with it.

* View the source

* Download the source

Feedback or thoughts, as always, are much appreciated. Leave comments, suggestions, criticisms here.

17 Responses to “Tutorial: DisplayShelf Component”

  1. Quietly Scheming » Blog Archive » Using the Graphics API for richer Flex: The DisplayShelf Component (from my MAX talk). Says:

    [...] The demo, source browser, and zip file are available here. Take a look, then come back and leave me a comment, tell me what you think. [...]

  2. [Quietly Scheming] Using Graphics API for richer Flex: The Display Shelf Component « Flexed Says:

    [...] [ Read More  |  Demo ] [...]

  3. Introducing the DisplayShelf widget at Blue Sky On Mars Says:

    [...] This afternoon, at CodeMash, James Ward and I took over an open spaces table, got some extra displays set up and hacked up a TurboGears widget wrapper for Ely Greenfield’s Display Shelf Flex component. The Display Shelf gives you the effect that Apple created in iTunes 7 with the cover art view. Now, in TurboGears, you can display your own photos the same way trivially. Just call the widget with a Python list of image URLs, and you’ve got your shelf! [...]

  4. James Ward’s Blog » Blog Archive » Flex and TurboGears at CodeMash - DisplayShelf Widget Says:

    [...] This past week I spoke at the CodeMash conference. It was a really great event full of stimulating conversation. Even more fun than trying to surf in the wave machine was an Open Spaces style session that Kevin Dangoor (creator of TurboGears) and I hosted. We had planned to just sneak off into a corner and turn Ely Greenfield’s DisplayShelf component into a TurboGears Widget. However, word quickly spread that we were going to do this and everyone wanted to watch as we coded. We had a bunch of fellow geeks huddled around every spare laptop and monitor we could find. I shared my screen with VNC so that everyone could watch what Kevin and I were doing. It was by far the best geek-out session I have had in a long time! Check out a screenshot of the DisplayShelf widget in a TurboGears application, showing a picture of our geek-out session: [...]

  5. Relations / links for 2007-02-06 Says:

    [...] Quietly Scheming » Tutorial: DisplayShelf Component The DisplayShelf component demonstrates using a number of flex and flash concepts to provide a rich, templatable control to display a faux-3d view of a list of items. Its behavior is similar to the CoverFlow visualization added to iTunes in version 7. (tags: software tutorial flex flash as3) Tags:No Tags [...]

  6. Quietly Scheming » Blog Archive » Howdjoo do that? An interactive walkthrough of the DisplayShelf 3D tilting effect Says:

    [...] Updated DisplayShelf page with interactive walkthrough [...]

  7. DisplayShelf component « Cyberspace Nova Says:

    [...] very nice and usable component with source is available here [...]

  8. Itunes Album Art Scroller in Flex at jharbs.com Says:

    [...] Ely Greenfield at Adobe is so talented. His blog is loaded with Flex Goodies, including Itunes 7esq image scroller with a reflection and bitmap tweening. There’s also a pretty cool addition called SuperImage, which helps with Flex image resizing. [...]

  9. The FlexWinds blog My first Apollo App – Flickr Sets viewer « Says:

    [...] The app uses the standard Cairngorm approach to structuring the code. The DisplayShelf component for the sets is from Quitely Scheming. When you select a set, it lazy downloads all the pictures for that set. I haven’t written the code to download to a directory, but that can be added easily. As expected its all data-bound with the ModelLocator. I have a FlickrDelegate class that does the job of talking to Flickr using the as3flickrlib. [...]

  10. links for 2007-07-11 « manalang Says:

    [...] Tutorial: DisplayShelf Component Great flex component for browsing images iTunes style (tags: flex flash components slideshow photo howto) [...]

  11. Sönke Rohde » iTunes like DisplayShelf Flex Component Says:

    [...] Ely Greenfield made a wonderful component which exactly does it. He calls the component DisplayShelf and you find his blog post here with source and example. Bookmark to:           - Posted in Flash, Flex by Sönke   [...]

  12. links for 2007-08-10 | giancarlo.dimassa.net Says:

    [...] Quietly Scheming » Tutorial: DisplayShelf Component (tags: flex flash as3 actionscript flex2 components slideshow photo album amazing apple animation browser blogs) [...]

  13.   List of 31 Flex APIs, Libraries, Components and Tools by Sean // the flash guy Says:

    [...] DisplayShelf Component Provides a rich, templatable control to display a faux-3d view of a list of items http://www.quietlyscheming.com/blog/components/tutorial-displayshelf-component/ [...]

  14. Wheeler Street » Blog Archive » Flex Custom Data Rendering Component: Tip #1 and #2 Says:

    [...] Tip #1: Research I would have to highly recommend Ely’s blog and look in the code he spent some serious time commenting. Especially check out the Display Shelf tutorial. [...]

  15. Useful links « Guavus Says:

    [...] DisplayShelf Component http://www.quietlyscheming.com/blog/components/tutorial-displayshelf-component/ [...]

  16. 1Stein.org » FlickrFlow Says:

    [...] Basically it uses the beta of Flex 3 and the DisplayShelf component, and some glue to get Flickr pictures into it. The source code is here: http://flickr.1stein.org/flickrflow/srcview. [...]

  17. JSP Proxy code for sourcing cross-domain Images « FLEXing My Muscle Says:

    [...] JSP Proxy code for sourcing cross-domain Images Sudheer and some guys from IITB were building some UI in Flex. They had a case where they were getting some photos from a server in another domain and then giving it to the DisplayShelf component by Ely to display in a cool UI. But when they tried to flip through the pictures using the interface, it threw an error as below. SecurityError: Error #2122: Security sandbox violation: BitmapData.draw: http://rrao01:8080/test/BugProject.swf cannot access http://www.theflexshow.com/blog/images/the_flex_show.jpg. A policy file is required, but the checkPolicyFile flag was not set when this media was loaded. at flash.display::BitmapData/draw() [...]

Leave a Reply