Packagecom.gestureworks.cml.factories
Classpublic class BitmapFactory
InheritanceBitmapFactory Inheritance ElementFactory Inheritance flash.display.Sprite
Subclasses Flickr, Image

The BitmapFactory is the base class for all Bitmaps. It loads and stores bitmap data, usually in the form an external image file. It is an abstract class that is not meant to be called directly.

See also

com.gestureworks.cml.element.Image
com.gestureworks.cml.factories.ElementFactory
com.gestureworks.cml.factories.ObjectFactory


Public Properties
 PropertyDefined By
 Inheritedalpha : Number
[override] [write-only] sets the alpha for display objects
ElementFactory
  aspectRatio : Number
[read-only] Stores the aspectRatio of the currently loaded image
BitmapFactory
  avatar : Boolean
sets the avatar value
BitmapFactory
  bitmap : Bitmap
Stores a reference to the currently loaded bitmap
BitmapFactory
  bitmapArray : Array
[read-only] stores images in an array
BitmapFactory
  bitmapData : BitmapData
Stores a reference to the currently loaded bitmapData
BitmapFactory
  bitmapDataArray : Array
[read-only] stores bitmap data array
BitmapFactory
  bitmapDataCache : Boolean
Specifies whether the bitmapData is cached or not
BitmapFactory
 Inheritedblur : Boolean
Sets the drop shadow effect
ElementFactory
 Inheritedbottom : Number
sets the bottom value
ElementFactory
 Inheritedclass_ : String
Object's css class;
ElementFactory
 InheritedclassName : String
sets the class name of displayobject
ElementFactory
 InheritedcmlIndex : int
sets the cml index
ElementFactory
 InheriteddebugStyle : *
sets the debug style
ElementFactory
 InheriteddisplayEvents : String
Use for dispatch completes.
ElementFactory
 InheriteddropShadow : Boolean
Sets the drop shadow effect
ElementFactory
  height : Number
[override] Sets width of the display object in pixels
BitmapFactory
 InheritedheightPercent : String
sets the height percent of display object
ElementFactory
 InheritedhorizontalCenter : Number
sets the horizontal center of display object
ElementFactory
 Inheritedid : String
sets the id of child
ElementFactory
 Inheritedindex : int
sets the index of display object
ElementFactory
  isLoaded : Boolean = false
BitmapFactory
  landscape : Boolean
[read-only] specifies whether the loaded image is landscape or not
BitmapFactory
 Inheritedleft : Number
sets left value
ElementFactory
  normalize : Boolean
specifies whether loaded image is normalised or not
BitmapFactory
  percentLoaded : Number
BitmapFactory
  portrait : Boolean
[read-only] specifies whether the loaded image is portrait or not
BitmapFactory
 InheritedpropertyStates : Array
Deprecated: Please Use state
ElementFactory
  resample : Boolean
Specifies whether a loaded image is resampled to the provided width and/or height.
BitmapFactory
 Inheritedright : Number
sets the right value
ElementFactory
 Inheritedscale : Number
Sets both the x and y scale values
ElementFactory
 InheritedscaleX : Number
[override] Sets width of the display object in pixels
ElementFactory
 InheritedscaleY : Number
[override] Sets width of the display object in pixels
ElementFactory
  sizeArray : Array
stores array list size
BitmapFactory
  src : String
Sets the file source path
BitmapFactory
 Inheritedstate : Array
property states array
ElementFactory
 Inheritedtop : Number
sets top value
ElementFactory
 InheritedverticalCenter : Number
sets the vertical center of display object
ElementFactory
  width : Number
[override] Sets width of the display object in pixels
BitmapFactory
 InheritedwidthPercent : String
sets the percent of width of display object
ElementFactory
Protected Properties
 PropertyDefined By
  img : IMGLoader
BitmapFactory
Public Methods
 MethodDefined By
  
Constructor
BitmapFactory
 Inherited
clone():*
Returns clone of self
ElementFactory
  
close():void
Closes the currently open image file
BitmapFactory
  
[override] This is called by the CML parser.
BitmapFactory
  
dispose():void
[override] Dispose methods and remove listener
BitmapFactory
 Inherited
init():void
Initialization function
ElementFactory
  
load(file:String):void
Deprecated: Please Use open()
loads external image file
BitmapFactory
  
loadComplete(event:Event = null):void
This is called when the image is loaded.
BitmapFactory
  
open(file:String = null):void
Opens an external image file
BitmapFactory
 Inherited
parseCML(cml:XMLList):XMLList
parses cml file
ElementFactory
 Inherited
postparseCML(cml:XMLList):void
post parses the cml file
ElementFactory
  
preloadFile(file:String):void
loads the file
BitmapFactory
  
resize():void
BitmapFactory
 Inherited
updateProperties(state:Number = 0):void
this method updates the properties
ElementFactory
Protected Methods
 MethodDefined By
  
BitmapFactory
  
BitmapFactory
Property Detail
aspectRatioproperty
aspectRatio:Number  [read-only]

Stores the aspectRatio of the currently loaded image

The default value is 0.


Implementation
    public function get aspectRatio():Number
avatarproperty 
avatar:Boolean

sets the avatar value

The default value is false.


Implementation
    public function get avatar():Boolean
    public function set avatar(value:Boolean):void
bitmapproperty 
bitmap:Bitmap

Stores a reference to the currently loaded bitmap

The default value is null.


Implementation
    public function get bitmap():Bitmap
    public function set bitmap(value:Bitmap):void
bitmapArrayproperty 
bitmapArray:Array  [read-only]

stores images in an array


Implementation
    public function get bitmapArray():Array
bitmapDataproperty 
bitmapData:BitmapData

Stores a reference to the currently loaded bitmapData

The default value is null.


Implementation
    public function get bitmapData():BitmapData
    public function set bitmapData(value:BitmapData):void
bitmapDataArrayproperty 
bitmapDataArray:Array  [read-only]

stores bitmap data array


Implementation
    public function get bitmapDataArray():Array
bitmapDataCacheproperty 
bitmapDataCache:Boolean

Specifies whether the bitmapData is cached or not

The default value is false.


Implementation
    public function get bitmapDataCache():Boolean
    public function set bitmapDataCache(value:Boolean):void
heightproperty 
height:Number[override]

Sets width of the display object in pixels

The default value is 0.


Implementation
    public function get height():Number
    public function set height(value:Number):void
imgproperty 
protected var img:IMGLoader

isLoadedproperty 
public var isLoaded:Boolean = false

landscapeproperty 
landscape:Boolean  [read-only]

specifies whether the loaded image is landscape or not

The default value is false.


Implementation
    public function get landscape():Boolean
normalizeproperty 
normalize:Boolean

specifies whether loaded image is normalised or not

The default value is false.


Implementation
    public function get normalize():Boolean
    public function set normalize(value:Boolean):void
percentLoadedproperty 
public var percentLoaded:Number

portraitproperty 
portrait:Boolean  [read-only]

specifies whether the loaded image is portrait or not

The default value is false.


Implementation
    public function get portrait():Boolean
resampleproperty 
resample:Boolean

Specifies whether a loaded image is resampled to the provided width and/or height. In order for resampling to work, this must be set to true, and a width and/or height must be set prior to calling open.

The default value is false.


Implementation
    public function get resample():Boolean
    public function set resample(value:Boolean):void
sizeArrayproperty 
sizeArray:Array

stores array list size


Implementation
    public function get sizeArray():Array
    public function set sizeArray(value:Array):void
srcproperty 
src:String

Sets the file source path

The default value is null.


Implementation
    public function get src():String
    public function set src(value:String):void
widthproperty 
width:Number[override]

Sets width of the display object in pixels

The default value is 0.


Implementation
    public function get width():Number
    public function set width(value:Number):void
Constructor Detail
BitmapFactory()Constructor
public function BitmapFactory()

Constructor

Method Detail
bitmapComplete()method
protected function bitmapComplete():void

close()method 
public function close():void

Closes the currently open image file

displayComplete()method 
override public function displayComplete():void

This is called by the CML parser. Do not override this method.

dispose()method 
override public function dispose():void

Dispose methods and remove listener

load()method 
public function load(file:String):void
Deprecated: Please Use open()

loads external image file

Parameters

file:String

loadComplete()method 
public function loadComplete(event:Event = null):void

This is called when the image is loaded. Do not override this method.

Parameters

event:Event (default = null)

onPercentLoad()method 
protected function onPercentLoad(event:StateEvent):void

Parameters

event:StateEvent

open()method 
public function open(file:String = null):void

Opens an external image file

Parameters

file:String (default = null)

preloadFile()method 
public function preloadFile(file:String):void

loads the file

Parameters

file:String

resize()method 
public function resize():void