Solved

progress bar based on time left.

Posted on 2004-10-05
12
165 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
Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 
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
 
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
The goal of the tutorial is to teach the user how to select which audio input to use. Once you have an audio input plugged into the laptop or computer, you will go into the audio input settings and choose which audio input you want to use.

778 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