Message Boards Message Boards

How to exclude the controls from exported swf movie?

Posted 11 years ago

I want to make an animation and place it in PowerPoint presentation. I already tried many possible movie formats and think that swf is the best. My code is below. It is the simulation of a random walk in 3D. I export it first to .avi, then look how many frames are there and import just the first half of the frames. I then export this frames to swf and the animation stops at the end position, which is what I want.
But I have a problem, because my frames have also the slider and so the slider is present in my final movie. How can I exclude it? In the video ( they say (2:45 min) that exporting the frames will do this. What do I need to change in my code that it will work? 
I also want to know how to control the color of black line which is showing in the animation. I also don't know how to change just the color of my box and leave the outside like it is set with background option. Or maybe change just the particular face of the box.

Thank you very much!
 data = ReadList[
    "C:\\Users\\luka\\Desktop\\GRAFI- DIPLOMA\\9_gibanje \
 elektrona\\simulacija\\animacija.txt", Number, RecordLists -> True];
 space = data[[All, 2 ;; 4]];
 poskus = Manipulate[
    Dynamic@{{GrayLevel[.3], Line[space[[1 ;; t]]]}, {Blue,
      PointSize[.015], Point[space[[t]]]},}, Axes -> True,
   AxesStyle -> Directive[FontSize -> 20, FontFamily -> "Helvetica"],
   AxesLabel -> {"x [nm]", "y [nm]", "z [nm]"},
   BoxRatios -> {1, 1, 1}, ImageSize -> 700,Background->RGBColor[0.851,0.851,0.851],
   BoxStyle -> Directive[Dashed, Thick],
   PlotRange -> {{-2620, 1600}, {-1700, 1450}, {-3500, 350}},
   SphericalRegion -> True],
  Row[{Control[{t, 1, Length[data], 1, Animator, ImageSize -> Small,
      AnimationRunning -> False, AnimationRate -> 50,
      AnimationRepetitions -> 1}], Spacer[10],
    Dynamic["time = " <> ToString[data[[t, 1]]]]}], FrameMargins -> 0]
POSTED BY: Luka Suhadolnik
2 Replies
Posted 11 years ago
Thank you!

I already got a great solution:
frames = Table[ Graphics3D[{{GrayLevel[.3], Thick, Line[space[[1 ;; t]]]}, {Blue, PointSize[.015], Point[space[[t]]]},}, Axes -> True, AxesStyle -> Directive[FontSize -> 20, FontFamily -> "Helvetica"], AxesLabel -> {"x [nm]", "y [nm]", "z [nm]"}, BoxRatios -> {1, 1, 1}, ImageSize -> 700, BoxStyle -> Directive[Dashed, Thick], PlotRange -> {{-2620, 1600}, {-1700, 1450}, {-3500, 350}}, SphericalRegion -> True], {t, 1, Length[space]}]; Export["", frames, "VideoEncoding" -> "MPEG-4 Video", "FrameRate" -> 1]
It works great ..


POSTED BY: Luka Suhadolnik
To do this, you simply want to export a list of Images or Graphics as an "SWF" file.

Consider this Manipulate

We can use Table to make a list of the different frames of this Manipulate. Here, we let m go from 0 to 1 in steps of 0.1:
listOfPlots = Table[Plot[Sin[m x], {x, 0, 10}], {m, 0, 10, 0.1}]

Plot statements are a type of Graphics, so we have a list of Graphics. This can be exported to "swf":
Export["test.swf", listOfPlots]

The "swf" file looks exactly like a movie made up of the frames in listOfPlots.
POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract