Thursday, July 2, 2009

Custom Preloader

This is the first step of customized preloader.
Here you would be able to edit the preloader text content.

package myCompents
{
import flash.events.ProgressEvent;
import mx.preloaders.DownloadProgressBar;
public class DownloadProgressbarSubclassMin extends DownloadProgressBar
{
public function DownloadProgressbarSubclassMin()
{
super();
downloadingLabel = "Downloading app...";
initializingLabel="initializing app.....";
MINIMUM_DISPLAY_TIME = 2000;
}

override protected function showDisplayForInit(elapsedTime:int, count:int):Boolean
{
return true;
}

override protected function showDisplayForDownloading(elapsedTime:int, event:ProgressEvent):Boolean
{
return true;
}

}
}

use this custom class in the flex application:

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" preloader="myCompents.DownloadProgressbarSubclassMin" >

<mx:Button label="clickme" />

<mx:TextInput text="This is text input Control" />
</mx:Application/>




0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home