fluidXtra :  schmittMachine support schmittMachine Support Home
Questions related to the fluidXtra Xtra 
Posted by: tomdussek ()
Date: March 21, 2007 11:15AM

When using pollcallBacks, is this a global setting that should be called from, e.g. on startMovie, or should I set it each time i schedule an event?

(Am I the first to post to the Fluid list, then?)

Tom Dussek

Options: ReplyQuote
Re: PollCallBacks
Posted by: antoine schmitt ()
Date: March 21, 2007 12:28PM

Hi Tom,
when you schedule an event, it will be executed at the given date, _no matter what_.
To be precise, the fluidXtra is automatically and internally called by Director at idle time, which happen when Director has some time on its hands. This happens at least once in each frame, and may happen more often. When it is called like this, the fluidXtra dispatches all the events that are due.
But in some cases, there is no idle time, for example if your code does a repeat loop, for example tracking the mouseDown or something else, there is no idle time for Director in this repeat loop and the fluidXtra is never called internally and some fluid events may be waiting to be dispatched. The pollCallbacks function is intended exately for these cases : it forces the fluidXtra to check its events and dispatch the ones that are due.

repeat while the mouseDown
-- track the mouse...

-- poll events
end repeat

There is no need to call pollCallbacks at other moments. Director does it automatically at idle time.

I hope that this is clear.

Options: ReplyQuote

Sorry, only registered users may post in this forum.
This forum powered by Phorum.