Step Function?

Am I doing this right? I want to check conditions and move objects around about 30 times every second (which is pretty much essential for any game). Right now I am just creating a timer which calls my function, which, in turn sets another timer:

[lua]function step( event )
–logic
timer.performWithDelay(1000/30, step)
end

timer.performWithDelay(1000/30, step)[/lua]

Is there a better way to do this? Maybe an event listener for new frames? Thanks. [import]uid: 16410 topic_id: 6331 reply_id: 306331[/import]

I thought that the “enterFrame” event listener was only called once when the app loaded. Checking the api set me straight. This is what I needed. [import]uid: 16410 topic_id: 6331 reply_id: 21897[/import]