Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My woes with Mathematica animations exported in SWF-format continue. The goal is to Export an animation in SWF-format, and also make it scalable, so that when I embed it into a slide set (produced by LaTeX) in PDF-format, the animation will resize when I zoom in/out. I have asked a related question on TeX.SE, where a solution via converting the animation into an MP4-file was suggested. That solution works, but lossy compression (or something) makes the end result look passable but not nearly as good as the same animation in a Mathematica notebook.

Following the further discussion in TeX.SE I looked at the header of the generated SWF-file with a text editor (NotePad). Indeed, there reads scaleMode - noScale. So time to study Mathematica's help files. Promising sounding options are listed in ref/format/SWF. Most notably Scalable and ControlAppearance (kind of pointless to have those unclickable control buttons in the end product). So let's try...

roll[u_] := Show[
  {ParametricPlot[{Cos[t] + u, Sin[t] + 1}, {t, 0, 2 Pi}, 
    AspectRatio -> Automatic, AxesOrigin -> {0, 0}, 
    Ticks -> {{0, 2 Pi, 4 Pi, 6 Pi}, {}}],
   ParametricPlot[{u, 1} - t {Sin[u], Cos[u]}, {t, 0, 1}],
   ParametricPlot[{t - Sin[t], 1 - Cos[t]}, {t, -0.6, u}],
   Graphics[{PointSize[0.02], Point[{u - Sin[u], 1 - Cos[u]}]}]}, 
  PlotRange -> {{-1.2, 20}, {-0.2, 4.2}}, Axes -> True]

sykloidi = Animate[roll[u], {u, 0, 20}]

Export["Analyysi I/2013/kalvot12-13/sykloidi.swf", sykloidi, 
 AnimationDuration -> 6, FrameRate -> 8, Scalable -> True, 
 ControlAppearance -> None]

Nope. No change. The .swf still does not scale. In the header of the SWF-file it still reads scaleMode - noScale, and the control buttons didn't disappear either.

Did I use wrong syntax for Export in the above snippet? What's the right way of doing this?

share|improve this question
Try "Scalable" -> True instead! – Dr. belisarius Dec 21 '13 at 16:32
Oh dear! @belisarius is right! How did I miss that <insert blushing emoticon>? It zooms just right, too! Would you like to write that as an answer, please? This is the first time I have ever seen a Mathematica-option needing quotation marks. – Jyrki Lahtonen Dec 21 '13 at 17:10
up vote 6 down vote accepted

I don't know why, but many options require the Option Name enclosed in quotation marks.
In this case:

"Scalable" -> True 

Usually the docs are clear enough (if you are mostly awake and pay attention):

Mathematica graphics

share|improve this answer
My guess is that they want to reduce namespace pollution, as strings aren't symbols, but the usage pattern seems a bit haphazard. – Sjoerd C. de Vries Dec 21 '13 at 20:50

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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