Sprite |
mSprite |
Preloader with color theme selection during main application load.
mSprite | Preloader with color theme selection during main application load. |
Public constructor | |
mSprite | Preloader constructor. |
Private methods | |
init | Initializes text message fields. |
onEnterFrameInit | First creates color theme buttons one on each enter frame event, then switches to listen for mouse events. |
onEnterFrameTerm | Progressively removes color theme buttons. |
onMouseOver | Highlights the color theme button the mouse hovers over. |
onMouseOut | Redraws the color theme button the mouse moved away from. |
onMouseDown | If the mouse button was clicked down on a theme color button then stores the color and starts to remove the theme buttons. |
removeButtons | Starts the progressive removal of the theme color buttons. |
load | Initiates load of the main application |
initHandler | If the user already selected a theme color then starts the main application, otherwise unloads the loader, the application is ready in cache when the user has finished the color choice. |
runContent | Informs the main application of the selected theme color and adds it to the stage display list. |
progressHandler | Displays load progress information. |
createScaleButton | Creates a color scale button and places it in a circle. |
drawScaleButton | Draws a color scale button as a rounded rectangle with a gradient radial fill. |
ioErrorHandler | Displays a load error message. |
securityErrorHandler | Displays a security error message. |
draw | Draws a background rounded rectangle with a gradient radial fill. |
Message | A dynamic text message class using the default font for minimal size. |
Message constructor | |
Message | Create a read-only text field with a default font. |
public function mSprite()
Preloader constructor.
Draws the background and informational messages. Then initiates the main application load and concurrently uses enter frame events to draw a progressive selection of theme colors. Uses mouse events to highlight theme colors.
Waits for load and theme color selection to be done before activating the main application with information about the selected theme color.
TextField |
Message |
A dynamic text message class using the default font for minimal size.
Message constructor | |
Message | Create a read-only text field with a default font. |
Preloader constructor.
public function mSprite()
Initializes text message fields.
private function init():void
First creates color theme buttons one on each enter frame event, then switches to listen for mouse events.
private function onEnterFrameInit( event: Event ):void
Progressively removes color theme buttons.
private function onEnterFrameTerm( event: Event ):void
Highlights the color theme button the mouse hovers over.
private function onMouseOver( event: MouseEvent ):void
Redraws the color theme button the mouse moved away from.
private function onMouseOut( event: MouseEvent ):void
If the mouse button was clicked down on a theme color button then stores the color and starts to remove the theme buttons.
private function onMouseDown( event: MouseEvent ):void
Starts the progressive removal of the theme color buttons.
private function removeButtons():void
Initiates load of the main application
private function load():void
If the user already selected a theme color then starts the main application, otherwise unloads the loader, the application is ready in cache when the user has finished the color choice.
private function initHandler( event: Event ):void
Informs the main application of the selected theme color and adds it to the stage display list.
private function runContent():void
Displays load progress information.
private function progressHandler( event: ProgressEvent ):void
Creates a color scale button and places it in a circle.
private function createScaleButton( i: uint ):void
Draws a color scale button as a rounded rectangle with a gradient radial fill.
private function drawScaleButton( button: Sprite, color: uint ):void
Displays a load error message.
private function ioErrorHandler( event: IOErrorEvent ):void
Displays a security error message.
private function securityErrorHandler( event: SecurityErrorEvent ):void
Draws a background rounded rectangle with a gradient radial fill.
private function draw():void
Create a read-only text field with a default font.
public function Message( labelText: String, color: uint = defaultColor, fontSize: uint = defaultFontSize )