The Image object represents an image that was created with the tag.
Images can be downloaded and cached dynamically by using the Image() constructor.
Images cannot be displayed using the constructor.
The constructor takes two optional arguments, width and height.
width specifies the width of the image in pixels.
height specifies the height of the image in pixels.
If these arguments are larger or smaller than the actual image, the image will be stretched to these dimensions.
The image to load is specified using dot notation and the src property.
Properties/Methods/EventsDescription
borderWidth of border around image
completeHas image finished loading?
heightHeight of image
hspacePadding on left and right of image.
lowsrcAlternate image for low-resolution displays
nameName of image
srcURL of image
vspacePadding on top and bottom of image
widthWidth of image
handleEvent()Invokes an images event handler
onAbortHandler when image load is aborted
onErrorHandler when error occurs while loading image
onKeyDownHandler for KeyDown events within image
onKeyPressHandler for KeyPress events within image
onKeyUpHandler for KeyUp events within image
onLoadHandler when image is finished loading
Example of Image Object