Adobe® Flex® 4 Language Reference
Hide Packages and Classes List |  Packages  |  Classes  |  Index  |  Appendixes
mx.preloaders 
IPreloaderDisplay 
Packagemx.preloaders
Interfacepublic interface IPreloaderDisplay extends IEventDispatcher
Implementors DownloadProgressBar, SparkDownloadProgressBar

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Defines the interface that a class must implement to be used as a download progress bar. The IPreloaderDisplay receives events from the Preloader class and is responsible for visualizing that information to the user.

See also



Public Properties
 PropertyDefined By
  backgroundAlpha : Number
Alpha level of the SWF file or image defined by the backgroundImage property, or the color defined by the backgroundColor property.
IPreloaderDisplay
  backgroundColor : uint
Background color of a download progress bar.
IPreloaderDisplay
  backgroundImage : Object
The background image of the application, which is passed in by the preloader.
IPreloaderDisplay
  backgroundSize : String
Scales the image specified by backgroundImage to different percentage sizes.
IPreloaderDisplay
  preloader : Sprite
[write-only] The Preloader class passes in a reference to itself to the display class so that it can listen for events from the preloader.
IPreloaderDisplay
  stageHeight : Number
The height of the stage, which is passed in by the Preloader class.
IPreloaderDisplay
  stageWidth : Number
The width of the stage, which is passed in by the Preloader class.
IPreloaderDisplay
Public Methods
 MethodDefined By
 Inherited
addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void
Registers an event listener object with an EventDispatcher object so that the listener receives notification of an event.
IEventDispatcher
 Inherited
Dispatches an event into the event flow.
IEventDispatcher
 Inherited
Checks whether the EventDispatcher object has any listeners registered for a specific type of event.
IEventDispatcher
  
Called by the Preloader after the download progress bar has been added as a child of the Preloader.
IPreloaderDisplay
 Inherited
removeEventListener(type:String, listener:Function, useCapture:Boolean = false):void
Removes a listener from the EventDispatcher object.
IEventDispatcher
 Inherited
Checks whether an event listener is registered with this EventDispatcher object or any of its ancestors for the specified event type.
IEventDispatcher
Property Detail

backgroundAlpha

property
backgroundAlpha:Number

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Alpha level of the SWF file or image defined by the backgroundImage property, or the color defined by the backgroundColor property. Valid values range from 0 to 1.0.

You can specify either a backgroundColor or a backgroundImage, but not both.



Implementation
    public function get backgroundAlpha():Number
    public function set backgroundAlpha(value:Number):void

backgroundColor

property 
backgroundColor:uint

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Background color of a download progress bar. You can have either a backgroundColor or a backgroundImage, but not both.



Implementation
    public function get backgroundColor():uint
    public function set backgroundColor(value:uint):void

backgroundImage

property 
backgroundImage:Object

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

The background image of the application, which is passed in by the preloader. You can specify either a backgroundColor or a backgroundImage, but not both.

A value of null means "not set". If this style and the backgroundColor style are undefined, the component has a transparent background.

The preloader does not display embedded images. You can only use images loaded at runtime.



Implementation
    public function get backgroundImage():Object
    public function set backgroundImage(value:Object):void

backgroundSize

property 
backgroundSize:String

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Scales the image specified by backgroundImage to different percentage sizes. A value of "100%" stretches the image to fit the entire component. To specify a percentage value, you must include the percent sign (%). A value of "auto", maintains the original size of the image.



Implementation
    public function get backgroundSize():String
    public function set backgroundSize(value:String):void

preloader

property 
preloader:Sprite  [write-only]

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

The Preloader class passes in a reference to itself to the display class so that it can listen for events from the preloader.



Implementation
    public function set preloader(value:Sprite):void

stageHeight

property 
stageHeight:Number

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

The height of the stage, which is passed in by the Preloader class.



Implementation
    public function get stageHeight():Number
    public function set stageHeight(value:Number):void

stageWidth

property 
stageWidth:Number

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

The width of the stage, which is passed in by the Preloader class.



Implementation
    public function get stageWidth():Number
    public function set stageWidth(value:Number):void
Method Detail

initialize

()method
public function initialize():void

Language Version: ActionScript 3.0
Product Version: Flex 3
Runtime Versions: Flash Player 9, AIR 1.1

Called by the Preloader after the download progress bar has been added as a child of the Preloader. This should be the starting point for configuring your download progress bar.