5/20/2010 3:57:20 PM
Title:
custom-preloader-progress-bar-flex
http://askmeflash.com/article/7/custom-preloader-progress-bar-flex
How do I change the amount of time the preload takes to work (more time/ less time)
CustomPreloader.as
Inder
Points: 2880
Posts:0
5/20/2010 8:57:45 PM
Do you want to delay the preloader some more time after loading completes 100%? Please explain a little bit.
The time preloader takes to load file depends upon the internet speed and your flex application size. More speed less time and less speed more time. You cannot make the preloader load content faster then its doing currently. The only way is to reduce your flex swf file size to make it load faster.
5/21/2010 11:19:17 AM
I would like to have the preload stay on the screen for 10 seconds (or 20 sec, etc.,) before it changes over to the mxml main page. Or perhaps have a preload that has to be closed by a click action.
Thanks,
John D.
Inder
Points: 2880
Posts:0
5/21/2010 11:36:50 AM
hi John,
The code responsible for launching the main application after loading complete is below line (event)
dispatchEvent( new Event( Event.COMPLETE ) );
//replace above code line with
//if tensecond timer is complete then launch it else nothing just set public variable loadingcomplete as true
loadingComplete=true;
if(tenTimerComplete){
dispatchEvent( new Event( Event.COMPLETE ) );
}
//now create a main timer of 10 sec and on complete of that timer check if loading is over then launch application
tenTimerComplete=true;
if(loadingComplete){
dispatchEvent( new Event( Event.COMPLETE ) );
}
this will make launch the application at least take 10 seconds or more to launch.
have any confusion let me know