Packagesekati.ui
Classpublic class Image
InheritanceImage Inheritance CoreSprite Inheritance flash.display.Sprite

Image provides a loadable Bitmap Image DisplayObject.



Public Properties
 PropertyDefined by
  bmp : Bitmap
Return the Image Bitmap.
Image
  bytesLoaded : uint
[read-only] Return the Image bytesLoaded.
Image
  bytesTotal : uint
[read-only] Return the Image bytesTotal.
Image
 Inheritedenabled : Boolean
Boolean stub property which subclasses implement to control core behavor availability such as interactivity, liquidity, drag-drop functionality.
CoreSprite
 InheritedinteractiveMode : Boolean
Specifies the mouse cursors modal state in the object as an interactive target via: buttonMode, mouseChildren & tabChildren.
CoreSprite
  loaded : Boolean
[read-only] Return true if Image is done loading, false if not.
Image
  request : URLRequest
[read-only] Return the Image URLRequest.
Image
  running : Boolean
[read-only] Return true if Image is loading, false if not.
Image
 Inheritedscale : Number
The scale value.
CoreSprite
Protected Properties
 PropertyDefined by
  _bmp : Bitmap
private
Image
  _bytesLoaded : uint
private
Image
  _bytesTotal : uint
private
Image
  _isLoaded : Boolean
private
Image
  _isRunning : Boolean
private
Image
  _loader : Loader
private
Image
  _request : URLRequest
private
Image
Public Methods
 MethodDefined by
  
Image(url:String, loadImmediately:Boolean = true)
Image Constructor
Image
 Inherited
addChildren(... args):void
Add multiple child DisplayObject's.
CoreSprite
  
close():void
Cancel the load() operation in progress.
Image
  
destroy():void
Clean up after thy self.
Image
  
load():void
Begin the load process.
Image
 Inherited
toString():String
Return reflective output.
CoreSprite
Protected Methods
 MethodDefined by
  
configListeners(isAdd:Boolean = true):void
Configure the adding and removing of Image listeners.
Image
  
errorHandler(e:Event):void
Dispatch ImageEvent.ERROR
Image
  
initHandler(e:Event):void
Dispatch ImageEvent.INIT
Image
 Inherited
invalidate():void
Request a redraw, use for deferred rendering.
CoreSprite
 Inherited
offStage(e:Event = null):void
Stub: Sprite has been removed from stage.
CoreSprite
 Inherited
onStage(e:Event = null):void
Stub: Sprite has been added to stage.
CoreSprite
  
progressHandler(e:ProgressEvent):void
Dispatch ImageEvent.PROGRESS
Image
Property detail
_bmpproperty
protected var _bmp:Bitmap

private

bmpproperty 
bmp:Bitmap  [read-write]

Return the Image Bitmap.

Implementation
    public function get bmp():Bitmap
    public function set bmp(value:Bitmap):void
_bytesLoadedproperty 
protected var _bytesLoaded:uint

private

bytesLoadedproperty 
bytesLoaded:uint  [read-only]

Return the Image bytesLoaded.

Implementation
    public function get bytesLoaded():uint
_bytesTotalproperty 
protected var _bytesTotal:uint

private

bytesTotalproperty 
bytesTotal:uint  [read-only]

Return the Image bytesTotal.

Implementation
    public function get bytesTotal():uint
_isLoadedproperty 
protected var _isLoaded:Boolean

private

_isRunningproperty 
protected var _isRunning:Boolean

private

loadedproperty 
loaded:Boolean  [read-only]

Return true if Image is done loading, false if not.

Implementation
    public function get loaded():Boolean
_loaderproperty 
protected var _loader:Loader

private

_requestproperty 
protected var _request:URLRequest

private

requestproperty 
request:URLRequest  [read-only]

Return the Image URLRequest.

Implementation
    public function get request():URLRequest
runningproperty 
running:Boolean  [read-only]

Return true if Image is loading, false if not.

Implementation
    public function get running():Boolean
Constructor detail
Image()constructor
public function Image(url:String, loadImmediately:Boolean = true)

Image Constructor

Parameters
url:String — location of the bitmap image to be loaded.
 
loadImmediately:Boolean (default = true) — whether to start the loading immediately or wait for a manual load() call.

Example
    var img : Image = new Image( "http://localhost/logo.png" );
    img.alpha = 0;
    addChild( img );
    
    img.addEventListener( ProgressEvent.PROGRESS, progressHandler );
    img.addEventListener( Event.INIT, loadHandler );
    
    private function progressHandler(e:ProgressEvent):void {
     trace( "img progress: "+e.target.bytesLoaded + "/" + e.target.bytesTotal );
    }
    
    private function loadHandler(e:Event):void {
     trace( "img loaded: smoothed bitmap available via img.bmp!" );
     
     Tweener.addTween( img, { alpha:1, time:0.5, transition:"easeOutQuad" } );
     
     img.removeEventListener( ProgressEvent.PROGRESS, progressHandler );
     img.removeEventListener( Event.INIT, loadHandler );
    }
   

Method detail
close()method
public function close():void

Cancel the load() operation in progress.

configListeners()method 
protected function configListeners(isAdd:Boolean = true):void

Configure the adding and removing of Image listeners.

Parameters
isAdd:Boolean (default = true)true add's the listeners, false removes them.
destroy()method 
public override function destroy():void

Clean up after thy self.

errorHandler()method 
protected function errorHandler(e:Event):void

Dispatch ImageEvent.ERROR

Parameters
e:Event
initHandler()method 
protected function initHandler(e:Event):void

Dispatch ImageEvent.INIT

Parameters
e:Event
load()method 
public function load():void

Begin the load process.

progressHandler()method 
protected function progressHandler(e:ProgressEvent):void

Dispatch ImageEvent.PROGRESS

Parameters
e:ProgressEvent