JPEG-XR Support

Flash Player 11 includes expanded support for still image file formats. Previous versions of Flash Player include support for the following image file formats: GIF, JPEG, and PNG – with any other files relying upon external code libraries for interpretation. The recent addition of JPEG-XR (International Standard ISO/IEC 29199-2) brings a new image file format to Flash Player which boasts more efficient compression than JPG, along with both lossy and lossless compression options. Like the PNG format, JPEG-XR also includes a full alpha channel.

Note

You may be wondering how to generate JPEG-XR files, since many popular tools (including Adobe Photoshop) do not support the export or conversion to .JXR natively. I’ve found the Windows-only tool Paint.NET (http://paint.net/) along with the JPEG XR plugin (http://pdnjpegxrplugin.codeplex.com/) to be most useful in converting images to JPEG-XR.

Many conversion programs actually leave out certain bytes which are necessary for the file to load into the runtime, due to security concerns.

JPEG-XR support

Figure 2-3. JPEG-XR support

To load a JPEG-XR file into Flash Player, you perform the same set of actions that are necessary for any external image to be loaded into a project:

package { import flash.display.Loader; import flash.display.Sprite; import flash.events.Event; import flash.events.ProgressEvent; import flash.net.URLRequest; import flash.text.TextField; ...

Get What's New in Flash Player 11 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.