.Periodical is what you are looking for :) http://mootools.net/docs/core/Types/Function#Function:periodical
http://jsfiddle.net/2SsHY/1/ On Sat, Jul 30, 2011 at 6:42 PM, Trevor Orr <[email protected]> wrote: > I am wanting to move an element around to random locations at random > durations continuously until an event occurs that stops the movement of the > element. I don't think I can use chain because that is a predefined number > of functions to call, I created a function that use Fx.Morph and then when > the morph completes I call the function again but that results in a > recursion error. I don't think I can use the periodical method since the > morphs are at random durations. Anyone have any ideas on how to do this? > > Here is what I have been playing with. > > http://jsfiddle.net/GuwXn/2/ > > Right now you have to keep clicking in the big box to see the small box > move just to give you an idea of what I want accomplish when I uncomment the > code in the complete event that is when I get the recursion error. > > >
