Preloader for Flex Application

Save the below code as a Class file and refer the class name as

import mx.preloaders.*;
import flash.events.ProgressEvent;
public class Bar extends DownloadProgressBar
{
public function Bar()
{
super();
// Set the download label.
downloadingLabel=”Downloading…”
// Set the initialization label.
initializingLabel=”Initializing book…”
// Set the minimum display time to 2 seconds.
MINIMUM_DISPLAY_TIME=2000;
}
// Override to return true so progress bar appears
// during initialization.
override protected function showDisplayForInit(elapsedTime:int,
count:int):Boolean {
return true;
}
// Override to return true so progress bar appears during download.
override protected function showDisplayForDownloading(
elapsedTime:int, event:ProgressEvent):Boolean {
return true;
}
}

  1. I was looking for the preloader which is as good as flash preloaders. thanks….

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: