progress bar based on time left.

I need a progress bar that will be based on time left.

For example. The customer clicks submit and the form takes 3 minutes to process. I want a progress bar that progresses to 100% when 3 minutes is reached

How can that be accomplished?

Brad
Brad_nelson1Asked:
Who is Participating?
 
CerfConnect With a Mentor Commented:
Hello there Brad,
I made a small example to see if I could get it to work and it did!
so here is it,

On the main timeline I used the rectangle tool to draw one and made it a movieclip, I edited it then and made the inside part (fill) another mc and called it "Progress". I named the instance of the main mc "PBar"

and put this code on the first frame

stop();
_global.elapsed_time = 0
_global.timeSet = 10 // Ten seconds, just change this to adapt it to your time needs
function Timer(){
      if( _global.elapsed_time<_global.timeSet){
      _global.elapsed_time++
      PBar.Progress._xscale=(Math.round(_global.elapsed_time*100/_global.timeSet));
      } else {
            trace("time's up!");
            trace("Resetting Timer");
            _global.elapsed_time = 0
            } //else
      }//fuction
setInterval( Timer, 1000 );

Let me know if you have any troubles getting it to work,

Cërf.
0
 
Brad_nelson1Author Commented:
Hi,
Thanks for your help! Any chance you could send me that .fla so i can see how you did it? its not working for me.
0
 
CerfCommented:
Sure, let me upload it,

Cërf.
0
Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

 
CerfCommented:
ready,
visit http://es.geocities.com/cerfx/flash and look for timed.zip.

Good luck and let me know,

Cërf.
0
 
Brad_nelson1Author Commented:
hmm, I get an unexpected file format.
0
 
CerfCommented:
oh, sorry, I'm using MX 2004, what version of flash are you using?
0
 
CerfCommented:
I uploaded timed_.zip, hope that works...

Cërf.
0
 
Brad_nelson1Author Commented:
Yep thats perfect! im using mx 2004 also.

This script is EXACTLY what im looking for, so thanks again..

also, how do I change the progress color? its green right now and I dont see that on any of the layers.

Thanks,
Brad
0
 
CerfCommented:
Open the library (CTRL+L) then double click on "Bar.Inside" and change the color.

Good to know it helped out!

Cërf.
0
 
CerfCommented:
Did you get it to work as you wanted to?
0
 
Brad_nelson1Author Commented:
yep worked like a charm,....thanks again!
0
 
CerfCommented:
No prob, glad I could help!

Cërf.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.