Packageorg.ow2.kerneos.core.view.preloader
Classpublic class KerneosPreloader
InheritanceKerneosPreloader Inheritance PreloaderDisplayBase Inheritance flash.display.Sprite

A custom preloader displayed while the user downloads the application. Massively inspired from http://www.pathf.com/blogs/2008/08/custom-flex-3-lightweight-preloader-with-source-code/ .

See also

org.ow2.kerneos.core.view.LoadingView


Public Properties
 PropertyDefined By
 InheritedbackgroundAlpha : Number
The background alpha.
PreloaderDisplayBase
 InheritedbackgroundColor : uint
The background color.
PreloaderDisplayBase
 InheritedbackgroundImage : Object
The background image.
PreloaderDisplayBase
 InheritedbackgroundSize : String
The background size.
PreloaderDisplayBase
 Inheritedpreloader : 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.
PreloaderDisplayBase
 InheritedstageHeight : Number
The stage height.
PreloaderDisplayBase
 InheritedstageWidth : Number
The stage width.
PreloaderDisplayBase
Protected Properties
 PropertyDefined By
 Inherited_backgroundColor : uint = 0xffffffff
The background color.
PreloaderDisplayBase
 Inherited_bytesExpected : uint = 1
The number of bytes expected.
PreloaderDisplayBase
 Inherited_bytesLoaded : uint = 0
The number of bytes already loaded.
PreloaderDisplayBase
 Inherited_fractionLoaded : Number = 0
The percentage loaded.
PreloaderDisplayBase
 Inherited_IsInitComplete : Boolean = false
Whether the initialization is complete.
PreloaderDisplayBase
 Inherited_preloader : Sprite
The actual preloader.
PreloaderDisplayBase
 Inherited_stageHeight : Number = 300
The stage height.
PreloaderDisplayBase
 Inherited_stageWidth : Number = 400
The stage width.
PreloaderDisplayBase
 Inherited_timer : Timer
The timer used to update the UI.
PreloaderDisplayBase
Public Methods
 MethodDefined By
  
Build a new KerneosPreloader.
KerneosPreloader
  
initialize():void
[override] This function is called when the PreloaderDisplayBase has been created and is ready for action.
KerneosPreloader
Protected Methods
 MethodDefined By
 Inherited
completeHandler(event:Event):void
Handler for the download complete event.
PreloaderDisplayBase
  
Create the background.
KerneosPreloader
  
Create the progress bar and the displayed label.
KerneosPreloader
  
draw():void
[override] This function is called whenever the state of the preloader changes: to be overriden.
KerneosPreloader
 Inherited
initCompleteHandler(event:Event):void
Handler for the initialization complete event.
PreloaderDisplayBase
 Inherited
initProgressHandler(event:Event):void
Handler for initiialization progress events.
PreloaderDisplayBase
 Inherited
progressHandler(event:ProgressEvent):void
Handler for download progress events.
PreloaderDisplayBase
 Inherited
timerHandler(event:Event):void
Handler for the UI update timer.
PreloaderDisplayBase
Constructor Detail
KerneosPreloader()Constructor
public function KerneosPreloader()

Build a new KerneosPreloader.

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

Create the background.

createUIChildren()method 
protected function createUIChildren():void

Create the progress bar and the displayed label.

draw()method 
override protected function draw():void

This function is called whenever the state of the preloader changes: to be overriden. Use the _fractionLoaded variable to draw your progress bar.

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

This function is called when the PreloaderDisplayBase has been created and is ready for action.