It needs to be set as a 'graphic' with appropriate looping rather than a 'movieclip' on the main timeline. Movieclips only run their timelines when displayed in an interactive format i.e. a swf, they don't animate when being rendered for other formats. In the same way, any actionscript is completely ignored when rendering to non-swf formats.

Cheers,
Rob