Chapter 8. Creating an Image Viewer Client


  • Overcoming the challenges of using images in Flash Lite

  • Creating core components for Image Viewer

  • Using PureMVC to build Image Viewer

It's hard to imagine, but there was a time when mobile devices weren't able to display color images. With most new devices being shipped with built-in cameras and featuring picture messaging, these days the ability to capture and/or manipulate images on a mobile device is a fairly common feature.

In this chapter, you will develop a simple Image Viewer client, a Flash mobile application that displays an array of images located on the device. We'll be referencing images from the Formula One team Brawn GP (now Mercedes GP), taken from various Grand Prix's and Practice sessions during the F1 season 2009.


Using images in Flash Lite has evolved greatly from the early versions of the runtime, when the only way to include images in an application was to embed them in the actual application or wrap them in a SWF container and load them dynamically into the application. Fortunately, these workarounds are no longer required.

Before we take a look at the code for the Image Viewer, in this section you'll get an idea of some of the issues you face in using images in Flash Lite applications:

  • Supported images

  • Loading multiple images

  • Memory considerations

  • Handling image sizes

Supported Images

When targeting a small number of mobile devices on which to run your Flash Lite content, you can ensure that ...

Get Professional Flash® Lite® Mobile Development now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.