Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

progress bar based on time left.

Posted on 2004-10-05
12
Medium Priority
?
173 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 8
  • 4
12 Comments
 
LVL 8

Accepted Solution

by:
Cerf earned 2000 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

610 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