| Package | com.pblabs.engine.resource |
| Class | public class ImageResource |
| Inheritance | ImageResource Resource flash.events.EventDispatcher |
| Property | Defined By | ||
|---|---|---|---|
| bitmapData : BitmapData [read-only]
Get the raw BitmapData that was loaded. | ImageResource | ||
![]() | didFail : Boolean [read-only]
Whether or not the resource failed to load. | Resource | |
![]() | filename : String
The filename the resource data was loaded from. | Resource | |
| image : Bitmap [read-only]
Once the resource has succesfully loaded, this contains a Bitmap representing
the loaded image. | ImageResource | ||
![]() | isLoaded : Boolean [read-only]
Whether or not the resource has been loaded. | Resource | |
![]() | referenceCount : int [read-only]
The number of places this resource is currently referenced from. | Resource | |
| Property | Defined By | ||
|---|---|---|---|
| _bitmapData : BitmapData = null | ImageResource | ||
![]() | _filename : String = null | Resource | |
![]() | resourceLoader : Loader [read-only]
The Loader object that was used to load this resource. | Resource | |
| Method | Defined By | ||
|---|---|---|---|
![]() | decrementReferenceCount():void
Decrements the number of references to the resource. | Resource | |
dispose():void [override]
Disposes the bitmapData object of this ImageResource
| ImageResource | ||
![]() | fail(message:String):void
This method will be used by a Resource Provider to indicate that this
resource has failed loading
| Resource | |
![]() | incrementReferenceCount():void
Increments the number of references to the resource. | Resource | |
initialize(data:*):void [override] | ImageResource | ||
![]() | load(filename:String):void
Loads resource data from a file. | Resource | |
| Method | Defined By | ||
|---|---|---|---|
onContentReady(content:*):Boolean [override]
This is called when the resource data has been fully loaded and conditioned. | ImageResource | ||
![]() | onFailed(message:String):void | Resource | |
![]() | onLoadComplete(event:Event = null):void
Called when loading and conditioning of the resource data is complete. | Resource | |
| _bitmapData | property |
protected var _bitmapData:BitmapData = null| bitmapData | property |
bitmapData:BitmapData [read-only] Get the raw BitmapData that was loaded.
public function get bitmapData():BitmapData| image | property |
image:Bitmap [read-only] Once the resource has succesfully loaded, this contains a Bitmap representing the loaded image. Because Bitmaps cannot be shared, this makes a new Bitmap every time it is called.
public function get image():Bitmap| dispose | () | method |
override public function dispose():voidDisposes the bitmapData object of this ImageResource
| initialize | () | method |
override public function initialize(data:*):voidParameters
data:* |
| onContentReady | () | method |
override protected function onContentReady(content:*):BooleanThis is called when the resource data has been fully loaded and conditioned. Returning true from this method means the load was successful. False indicates failure. Subclasses must implement this method.
Parameters
content:* — The fully conditioned data for this resource.
|
Boolean — True if content contains valid data, false otherwise.
|