Zune Media Viewer
November 23rd, 2006 . by polyGeekFor the launch of the Zune.net website we needed a photo viewer and video player combination that I call the ZMP. I I whipped this little thing together in about a weeks time. There are instances of the ZMP all over Zune.net. They are changing all the time so I can’t link directly to one.

This, like most every RIA I produce, has one empty keyframe. On that keyframe is a bit of code that loads the XML - using my XO class - and when converted to an object then calls the appropriate class that calls other classes and loads external images or whatever and eventually builds an application. But, the FLA has a timeline with nothing but a small bit of code.
The ZMP uses the DrawingAPI to create the panels that you see in the interface. It would have been simple to create MovieClips in the library that could be attached at runtime. The problem with that is that they wanted to be able to theme the ZMP differently for each artist. By using the DrawingAPI I can keep all the colors, thicknesses, alpha settings, etc., in the XML where it can be easily edited by the production crew and artists. I don’t have to be involved with it at all.
One thing that I discovered during this process is that the DrawingAPI centers strokes over the position where they are drawn. (read more about that here.) Once I had that down it was simple to draw the interface in pixel perfect positions.











