Package | flash.system |
Class | public final class ImageDecodingPolicy |
Inheritance | ImageDecodingPolicy Object |
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 2.6, Flash Player 11 |
LoaderContext.imageDecodingPolicy
property.
The two decoding policies are:
-
ON_DEMAND:
Decode the image synchronously when it is needed. This setting is useful for smaller images. -
ON_LOAD:
Decode the image asynchronously, immediately after it loads. This setting is useful for larger images.
ON_DEMAND
.
Related API Elements
Constant | Defined By | ||
---|---|---|---|
ON_DEMAND : String = "onDemand" [static]
Specifies that the bitmap image file is decoded synchronously at the time it is needed. | ImageDecodingPolicy | ||
ON_LOAD : String = "onLoad" [static]
Specifies that the bitmap image file is decoded asynchronously at the time it is loaded. | ImageDecodingPolicy |
ON_DEMAND | Constant |
public static const ON_DEMAND:String = "onDemand"
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 2.6, Flash Player 11 |
Specifies that the bitmap image file is decoded synchronously at the time it is needed. This is the default policy. It is optimal for smaller images.
The decoded data may be flushed at will by the runtime. If the decoded data is flushed, the runtime decodes the data again when the data is needed.
Related API Elements
ON_LOAD | Constant |
public static const ON_LOAD:String = "onLoad"
Language Version: | ActionScript 3.0 |
Runtime Versions: | AIR 2.6, Flash Player 11 |
Specifies that the bitmap image file is decoded asynchronously at the time it is loaded. Decoding begins before the LoaderInfo object dispatches a complete
event.
This option is best for large images and for applications with complex effects and transitions.
The decoded image data is cached, and may be flushed at will by the runtime. If the decoded data is flushed, the runtime decodes the data again when the data is needed.
Related API Elements
Mon Nov 28 2011, 06:48 AM -08:00