>Timeouts objects are a great feture of the new Director
>generation. They look like fully self-contained objects
>able to send events to any previously defined method in
>another class or to a movie level handler.
>
>I think it would be seemingly simple for Macromedia adding
>a property "enabled" to its timeout object. Introducing
>such prop imho would lead to a cleaner and faster code.


1) You can 'mute' a timer by using:

----
myTimeoutObject.timeOutHandler = ""
----

and unmute it by setting the timeOutHandler to whatever handler you need.


>2) Synchronizing the release of timeout events with the
>    exitFrame events.


2) I'm not sure that I fully understand why you want to do this.

a) Either you want to keep the timer going, but in muted mode, and 
then make it unmuted when exitFrame occurs, in which case you do like 
in (1).

b) Or you want the timer to reset on exitFrame. In this case you 
would not get a timer - you'd get something that stutters every 
exitFrame. If you want to reset the timer every exitFrame, then you 
could just:

----
on exitFrame(me)
   timeout("myInterval").forget()
   timeout("myInterval").new(50, #tryNextStep, me)
end

on tryNextStep(me)
   -- do stuff every exitFrame + every time a timeOut occurs
end
----


-Andreas

[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