Charles Petzold has published an interesting article on creating custom animation classes. Read it here.
Sometime back I had used these concepts in making the GenieAnimation. It would have saved me some time if Charles had published this article earlier :)