This tends to work best with complex objects. It may be a little bit of overkill for such a simple animation.
The easiest way is to use a blend and then Layer releasing...
Merely set up the art to have the sun at the high and low point... I started with the sun in the low position and then copied/duplicated it to the high position. Basically I stacked the objects I want from the start of the animation to the end of the animation. This matters.
Select both suns and choose
Object > Blend > Make, then choose
Object > Blend > Blend Options and set the
Spacing drop down to Specified Steps, entering the number of iterations you want.
Object > Expand, make certain the
Object checkbox is checked and hit
The artwork should expand to show all instances selected and highlighted. Now choose
Object > Ungroup (expanding blends groups them).
Now move to the Layers Panel.
Highlight the layer with the suns and from the Layer Panel Menu choose
Release to Layers (sequence).
- The existing stacking order of the objects matters here.
- If you stacked your objects from the end position (bottom of stack) to the start position (top of stack) you would chose the other release option (build).
- in short (Sequence) refers to start → end, (Build) refers to end → start as seen in the existing object stack.
You'll then have a layer for each stage of the sunrise.
From here you can individually alter each layer/iteration if desired.
Then export the layers as files for use elsewhere.
If you want each iteration as a separate Illustrator file, check out Joojaa's Script in this answer: How to export a sequence of layers in illustrator? it'll export each layer as a separate file.
From there use whatever animation software you want. You'll have individual vector files. Illustrator itself is really only capable of .swf export for animation.. which is.. well. not very useful most of the time. Disclosure, I haven't jumped into Adobe Animate yet.. so I'm in the dark as to it's capabilities. Since it was Flash.. maybe it handles the .swf exported file fine. I don't know.
Also be aware that blends do not have to be straight paths. You can use the
Replace Spine feature to make a blend use a more freeform path, then expand and follow the same steps.