views:

185

answers:

3

Hi,

I am developing a static flex application which does not have a database connection, all the values are hardcoded(its just a prototype for the original app). Now when i click the save button, i need to get a message like saving in progress... please wait, I need to display this message for 3 seconds.

Please let me know how could this be done.

Thanks!

Cheers,

Deena

A: 

Use a timer that triggers every 200ms or something, and each time it triggers have it add 3s/200ms to the progress bar.

CookieOfFortune
A: 

Fist create a timer with:

private var t:Timer = new Timer(3000,1);

Then add an event lister to resond when the timer will be finished:

t.addEventListener(TimerEvent.TIMER_COMPLETE, removeMSG);
//start timer
t.start();

Add, removeMSG function that will remove your progress bar or notifier:

private function removeMSG(e:TimerEvent):void{
    //code to remove the notification
}

Also if you plan to use ProgressBar control in Flex use indeterminate="true" that will make progress bar move without any feedback data from your webservice

Ladislav
Thanks Ladislav!
Deena
No problem, that is why g33ks are here for :)
Ladislav
+1  A: 
Deena