Array

Asynchronous Bitmap Decoding

Must Read

Admin
Admin
Just post!

An improvement to AIR 2.6 allows the decoding of bitmaps on a separate thread. To take advantage of this, use the LoaderContext class as follows:

[code]

import flash.system.LoaderContext;
import flash.display.Loader;
var lc:LoaderContext = new LoaderContext();
lc.imageDecodingPolicy = ImageDecodingPolicy.ON_LOAD;
var loader:Loader = new Loader();
loader.load(new URLRequest(“image.jpg”, lc);

[/code]

This improvement also works with Loader.loadBytes().

The asynchronous decoding allows animations to play smoother. For instance, while you have an animation running, you can now load another graphic in the background without concern that the process will temporary interrupt the animation.

Previous articleCustom Cursor
Next articleCaching Assets
- Advertisement -

Latest News

Elevate Your Bentley Experience: The Bespoke Elegance of Bentayga EWB by Mulliner

Bentley Motors redefines the essence of bespoke luxury with the introduction of the Bentayga EWB's groundbreaking two-tone customization option—a...
- Advertisement -

More Articles Like This

- Advertisement -