4
$\begingroup$

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.

Is there any simple way to get a animation with only forward play?

Note that the problem in the the Export command. Indeed, Manipulate does the job (no need to specify AnimationDirection -> Forward).

$\endgroup$
  • $\begingroup$ Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Read the faq! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! $\endgroup$ – Michael E2 Apr 29 '15 at 19:26
  • $\begingroup$ You can format inline code and code blocks by selecting it and clicking the {} button above the edit window. The edit window help button ? is also useful for learning how to format your questions and answers. $\endgroup$ – Michael E2 Apr 29 '15 at 19:26
  • $\begingroup$ My answer here can be adapted, too: mathematica.stackexchange.com/a/71761 (Just replace the DeleteDuplicate[..] in autolist for the Manipulator with {min, max}. $\endgroup$ – Michael E2 Apr 29 '15 at 20:58
7
$\begingroup$

The easiest way (I think) is to set bookmarks. Then Export will interpolate between them.

Export["try.swf",
 Manipulate[
  Plot[Sin[2*x + φ], {x, 0, 10}],
  {{φ, 5.2308285471612335}, 0, 2*Pi},
   Bookmarks -> 
   {"start" :> {φ = 0.}, 
    "stop" :> {φ = 2. Pi}}]]

enter image description here

$\endgroup$
  • $\begingroup$ Tanks a lot @Michael E2! That's amazing ;-) $\endgroup$ – Tatayoyo Apr 29 '15 at 21:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.