The quick way is to use the Control class method "toggle-recording-to-movie", which will export a movie to a file called "simulation.mpeg".
For more control over exporting a movie, see the "Movie" class.