Question:

How to eliminate the backward play in Export of Manipulate?

Miles: 26 June 2022

I find that the Export of Manipuate contains backforward play, see a simplified example:

Export["try.swf", 
 Manipulate[
  Plot[Sin[2 x + φ], {x, 0, 10}], {φ, 0, 2 π}]]

You can see the problem in the SWF file. (I'm sorry that the exported SWF file cannot be uploaded here)

Actually, I have two questions here,

  1. Is there any simple way to get a animation with only forward play? I can find nothing about this in the help documents.

  2. Why is GIF not working in Export? That is to say, if I use Export["try.gif", Manipulate[...]],the exported file, otherwise an animation, is only a static picture actually.

Answer:
Rowan: 26 June 2022

Both questions can be addressed by using a Table to generate the frames of the animation rather than Manipulate:

mov = Table[Plot[Sin[2 x + ϕ], {x, 0, 10}, PlotRange->All], {ϕ, 0, 2 π, 
2 π/10}];
Export["movie.gif", mov] 

enter image description here

Although this runs the animation in the forward direction only, it does repeat indefinitely. This technique is not limited to .gif, e.g., I use this to export .swf animations quite a bit.

You can of course control the smoothness of the animation by changing the increment 2 π/10 to something smaller if you like.