>Thanks to everyone who helped.
>Here is the solution. I'm not sure if it can get
>anymore succinct or elegant, but it works.
>
It was hard to tell from your earlier message exactly what format you
want the time to be in, otherwise I was going to suggest this before.
Sorry if you spent a lot of time I could have saved....
There's a lingo function to do what you wanted:
on putTime cFrame,tFrames
put "Total =" && framesToHMS(tFrames,10,false,true)
put "Elapse =" && framesToHMS(cFrame,10,false,true)
put "Remain =" && framesToHMS(tFrames-cFrame,10,false,true)
end
I left out the "-" you put into your version, because I think of time
remaining as being a positive amount. Also, once you get past the end
(which may never happen, but just imagine it) you would have two "-"
in a row.
Meanwhile, back at the function, this is the format:
frameToHMS(number of frames, frame rate per second, drop frames,
fractional frames)
The number of frames is obvious, the frame rate is 10 in your case
but could have been past as a parameter. Drop frames relates to NTSC
timing, which doesn't affect you, and fractional frames lets you
return the number either as a decimal of a second, or as a frame
value.
There is the opposite direction too, to convert time into frames.
It's HMSToFrames(), and has the same four parameters.
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]