Heh, well, the truth was I was making it for Flash,
but I was figuring out the script in Director b/c
Director is a heck of a lot easier to script and
test in, even with the new syntax in Flash 5.

The only thing I can do to hasten the process,
is instead of making three duplicate sets of
functions in a three tier if..then..else if
statement, I simply do the function once,
but change the variable name dynamically
inside the functions.

Thanks again for all the help and advice.

-StevenSacks
[EMAIL PROTECTED]

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On
> Behalf Of Colin Holgate
> Sent: Wednesday, November 08, 2000 9:05 AM
> To: [EMAIL PROTECTED]
> Subject: Re: <lingo-l> Time computation based on frame - Solved
> 
> 
> >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!]
> 
> 

[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!]

Reply via email to