Solved

progress bar based on time left.

Posted on 2004-10-05
12
170 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 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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The last time I worked with Flash and Socket connections was in AS1. A recent project required flash connecting to a Socket, and sending receiving information - we figured it would be easy enough - we all know about the socket policy documents and c…
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…
The goal of the tutorial is to teach the user how to how to record live broadcast.

696 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