  | |  Re: some information about timeout objects (was: Re: [dirGames-L]
Kil l Child | Re: some information about timeout objects (was: Re: [dirGames-L]
Kil l Child 2003-12-12 - By Alex da Franca
Back At 13:48 Uhr -0800 12.12.2003, Thomas Higgins wrote: > >That means you must be careful when targeting a script object as you can get >two exitFrame calls per frame if your target is a behavior with an exitFrame >handler (the handler gets called once for the timeout object then again for >the general frame event).
allow me to add how to avoid the overhead:
as seen in Toms mail, if the timeout object 'forwards' the event, it adds a reference to itself as parameter. so you can distinguish between 'regular' exit-/prepareframe and additional exit-/prepareframe events.
on exitframe me if the paramcount > 1 then exit -- caused by timeout ... end
on prepareframe me if the paramcount > 1 then exit -- caused by timeout ... end
surely you do only need the 'waste' of the extra cycle, if you use a timeout object with this behavior as target. --
||| a?ex --
__ ____ ____ ____ ____ ____ ____ ____ ____ ____ dirGames-L mailing list - dirGames-L@(protected) http://nuttybar.drama.uga.edu/mailman/listinfo/dirgames-l
Earn $52 per hosting referral at Lunarpages.
|
|
 |