Hello Lingo Slingers!

I am curious as to how Director deals with time.

This is my frame script:

on exitFrame me
  global timeKeeper --an objecet birthed in the startMovie handler
  keepTrackOfTime timeKeeper --a message sent to the timeKeeper to keep 
track of the time ( in seconds)
  go the frame --when timeKeeper is done, do this again, and again, and 
again.
end

This is my Handler in the child object  timeKeeper called from the On 
exitFrame handler above.

on keepTrackOfTime  me
  put the timer/60 --outputs time (in seconds) to the message window
  set the text of member "time feild" to string(the timer/60) -- a feild 
that displays the current time (in seconds) on the stage
end

Here are the results!

Firstly, when playing this Director movie with a frame rate of 15 FPS,
the message window would display
--0
--0
--0
--0
--0
--0
--0
--0
--0
--0
--0
--0
--0
--0
--0
--1
--1
--1
--1
--1
--1
--1
--1
--1
--1
--1
--1
--1
--1
--1
--2
--etc
On AVERAGE: Fifteen each.

Meanwhile, on the stage, the feild displaying the current time seems to 
be updating in real seconds.

Obviously the message window is not a concern with the final exported movie,
however, the reason for this excersise was to determine how Director 
deals with time.

I found out that when I change the 15 FPS to 1 FPS,
both the feild on stage as well as the message window appear to be 
keeping "Real Time" in seconds.

I can only assume that the message window updates relative to the FPS 
set for the current movie?

But why does the feild on stage update exactly every second when I don't 
recall specifying it to do so?

Does the division in the (timer/60) take care of all this?

For those who see
that which I do not
please do tell!

Thank you.

Christopher

Just like programming,
it takes loads of syntax to ask a question!


[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