If you mean you want to be able to go back to the web site multiple times and see how far along it has continued to count, that won't happen with the approach your code shows unless you leave the file running and hang around for the 8 million counts. Your code will always start counting at 1.
What you really need to have is a timer that counts relative to a starting date/time.
How would I do this? I'm fairly new at this so I'm trying to learn.
1 person found this helpful
What you would do is select a starting date/time, preferably in the past relative to the date/time you have the file on the web. Then you take the current date/time and subtract the starting date/time from it. Then convert that if you need to into some numeric value.
Just as a for instance, look into the getTime() method of the Date class. It always returns the number of milliseconds from a particular date/time (January 1, 1970). So you declare a start Date object using the Date constructor (see the help files) and use the getTime() method for that Date to get the starting time. Then keep looping and creating new Date object for the current date/time and run the getTime() method for that. Within each loop you subtract the second time from the first to get the time between them (in milliseconds) which you are free to deal with as you prefer in terms of how you convert/present it. When the desired value has been reached you execute your tf.text = String(endT); line.