matt
(gingerbeardman)
2
Try putting your code in the sprite's update function. That code is run every time the Sprite is updated which feels right for your task.
You might also find Nic's sequence library useful. It may not do what you want, exactly, but will have some good ideas in its code.