Best way to animate and have converted to anim gif?

Im creating a demo on a iphone of a short coverflow sequence.

At the end I need the sequence to be an animated gif.

Should I go with flash or after effects… and how do I get it to become an animated gif.

Any thoughts as to process… ideas?

Thanks,

wnf