Create an animated gif,
then import into Keynote and set animation preferences, then file >
Export to QuickTime, from there you can add to iMovie if desired.
Create a layered file in Photoshop to use for your animation. Be sure to make is no larger than 72 dpi and 5 x 7 inches.
Go to Window > Timeline
Click the triangle on Create Video Timeline and select Create Frame Animation, Then click on the words "Create Frame animation"
Click the panel fly-out menu and select Make Frame from Layers
Adjust your timing and settings - Loop etc.
Test by clicking on the play button
Go to File > Export > Save for Web
SAVE
If using Keynote to present animations .... Select the
animated GIF > Inspector > QuickTime > Repeat > Loop