Packageqnx.ui.display
Classpublic class Image
InheritanceImage Inheritance UIComponent Inheritance flash.display.MovieClip

The Image class displays an image. It can display an image by using a URL to an image, a Bitmap instance or a BitmapData instance.

See also

qnx.utils.ImageCache


Public Properties
 PropertyDefined By
  cache : ImageCache
Gets or sets the ImageCache object to use to cache the image.
Image
 Inheritedcontainment : String
Gets or sets a property that determines how a component is contained within a parent container.
UIComponent
  pixelSnapping : String
Controls whether or not the Bitmap object is snapped to the nearest pixel.
Image
 Inheritedsize : Number
Gets or sets the size for this component (as a percentage of the container's size, or in pixels).
UIComponent
 InheritedsizeMode : String
Gets or sets the size mode for this component.
UIComponent
 InheritedsizeUnit : String
Gets or sets the unit of measure for the size property.
UIComponent
  smoothing : Boolean
Controls whether or not the bitmap is smoothed when scaled.
Image
Public Methods
 MethodDefined By
  
Constructs an Image instance.
Image
 Inherited
destroy():void
Call this method when you want to have your object collected by the garbage collector.
UIComponent
 Inherited
drawNow():void
Calls the draw() method.
UIComponent
 Inherited
invalidate(property:String, invalidateNow:Boolean = false):void
Marks the property as invalid and the draw() method is called on the next frame or the next render, whichever comes first.
UIComponent
  
setImage(image:Object):void
Sets the image.
Image
 Inherited
setPosition(x:Number, y:Number):void
Sets the x and y position of the component.
UIComponent
 Inherited
setSize(w:Number, h:Number):void
Sets the width and height of the component.
UIComponent
Protected Methods
 MethodDefined By
 Inherited
callLater(method:Function):void
Calls the specified method on the next frame or the next render, which ever happens first.
UIComponent
 Inherited
createInstance(linkage:Object):DisplayObject
Calling this method will attempt to create a DisplayObject instance based on the value of the linkage parameter.
UIComponent
 Inherited
draw():void
Called every time you set the width and height of the component.
UIComponent
 Inherited
isInvalid(property:String, ... properties):Boolean
Checks to see if the property is invalid and returns true if it is.
UIComponent
 Inherited
onAdded():void
Called when the instance is added to the stage.
UIComponent
 Inherited
onRemoved():void
Called when the instance is removed from the stage.
UIComponent
 Inherited
setEnabled(val:Boolean):void
Called when the enabled property changes.
UIComponent
 Inherited
validate(property:String):void
Lets the component know that the specified property has been validated.
UIComponent
Events
 Event Summary Defined By
  Dispatched when the image is loaded and ready to be used.Image
  Dispatched when the image cannot be loaded.Image
Property Detail
cacheproperty
cache:ImageCache

Gets or sets the ImageCache object to use to cache the image.


Implementation
    public function get cache():ImageCache
    public function set cache(value:ImageCache):void

See also

pixelSnappingproperty 
pixelSnapping:String

Controls whether or not the Bitmap object is snapped to the nearest pixel. The PixelSnapping class includes possible values:


Implementation
    public function get pixelSnapping():String
    public function set pixelSnapping(value:String):void
smoothingproperty 
smoothing:Boolean

Controls whether or not the bitmap is smoothed when scaled. If true, the bitmap is smoothed when scaled. If false, the bitmap is not smoothed when scaled.


Implementation
    public function get smoothing():Boolean
    public function set smoothing(value:Boolean):void
Constructor Detail
Image()Constructor
public function Image()

Constructs an Image instance.

Method Detail
setImage()method
public function setImage(image:Object):void

Sets the image. The image parameter can be of type String as a URL to an external image, Bitmap instance or a BitmapData instance.

Parameters

image:Object — The image to be set.

Event Detail
complete Event
Event Object Type: flash.events.Event
Event.type property = flash.events.Event.COMPLETE

Dispatched when the image is loaded and ready to be used.

ioError Event  
Event Object Type: flash.events.IOErrorEvent
IOErrorEvent.type property = flash.events.IOErrorEvent.IO_ERROR

Dispatched when the image cannot be loaded.