PDA

View Full Version : seconds expressed as 00,01,02,etc.


mitchpowell
12-04-2001, 07:32 AM
I'm real sorry if this is an outrageously ignorant question I can find the answer to if only I looked in the right place, but I'm sorta in over my head on my final project in Flash class and I'm trying a crash course on intermediate ActionScript techniques and I have a deadline and so this simple coding question: how to get the time to display its' seconds expressed as 00, 01, 02, etc.
I just finished the time tutorial here and like the results except for the missing leading digit, the "0".:confused:

Billy T
12-04-2001, 07:40 AM
here's a tut that might help

http://www.macromedia.com/support/flash/ts/documents/simpleclock.htm

its for making a clock but has a couple of lines of code for adding a 0 in front of the seconds when they are under 10

cheers

mitchpowell
12-04-2001, 08:58 AM
little by little, I'm crashing headlong into this.
I'll now be looking up the tutorials which explain how to determine such things as the modem speed/download time for the current user. Have any suggestions there?

poab
12-05-2001, 03:00 PM
Hi,

What you should do, after 10 frames of you loading scene, is use the getTimer() function to find out how long the movie's been running. Then divide it by 10, giving you the time it takes to load 1% of your loading page. If you then multiply it by 90, you'll have the time remaining until the user is passed to the next scene. You'd have to repeat the method every ten frames or so if you wanted the remaining time to update.

cheers.

mitchpowell
12-05-2001, 04:39 PM
Thank you. I'll use it.