Solved

progress bar based on time left.

Posted on 2004-10-05
12
161 Views
Last Modified: 2010-04-03
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
0
Comment
Question by:Brad_nelson1
  • 8
  • 4
12 Comments
 
LVL 8

Accepted Solution

by:
Cerf earned 500 total points
ID: 12233302
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
 

Author Comment

by:Brad_nelson1
ID: 12234067
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
 
LVL 8

Expert Comment

by:Cerf
ID: 12236804
Sure, let me upload it,

Cërf.
0
 
LVL 8

Expert Comment

by:Cerf
ID: 12236853
ready,
visit http://es.geocities.com/cerfx/flash and look for timed.zip.

Good luck and let me know,

Cërf.
0
 

Author Comment

by:Brad_nelson1
ID: 12240382
hmm, I get an unexpected file format.
0
 
LVL 8

Expert Comment

by:Cerf
ID: 12241633
oh, sorry, I'm using MX 2004, what version of flash are you using?
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 8

Expert Comment

by:Cerf
ID: 12241883
I uploaded timed_.zip, hope that works...

Cërf.
0
 

Author Comment

by:Brad_nelson1
ID: 12242177
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
 
LVL 8

Expert Comment

by:Cerf
ID: 12245369
Open the library (CTRL+L) then double click on "Bar.Inside" and change the color.

Good to know it helped out!

Cërf.
0
 
LVL 8

Expert Comment

by:Cerf
ID: 12252760
Did you get it to work as you wanted to?
0
 

Author Comment

by:Brad_nelson1
ID: 12273903
yep worked like a charm,....thanks again!
0
 
LVL 8

Expert Comment

by:Cerf
ID: 12277588
No prob, glad I could help!

Cërf.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Recently, I was asked to recommend a tracking system to be implemented on a clients website. As the entire site was built on flash, my first thought was to suggest custom built tracking system. However, our company at that point of time didn't h…
In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now