How to Export Video from Flash

Today I’ll show you my own technique, after many and many videos exported from Flash, in this tutorial called How to Export Video from Flash. The technique is not a fabulous one, and doesn’t require an advanced level, but it wont fail when you need to export your animation in a video format on a high quality.


Preview

Setting all files

Let’s say you will create an app, or a simple animation using OOP, and you want to export this as video. Create a new ActionScript 3.0 Flash file with dimensions 590x300px, and let’s create a simple animation. Create a MovieClip on Stage, with instance name mc. If you don’t know already how to work with Caurina, make sure to check How to properly install Caurina Tweener classes, because we will use this. Create a new ActionScript 3.0 Class file, called Main and set this in Flash to be Document Class.


Animating

Let’s focus on Main.as class – we will animate the MovieClip mc five times, once per second. Declare all variables:

public var mc:MovieClip;
private var timer:Timer;

Create a timer to animate the MovieClip mc:

timer = new Timer(1000, 5);
timer.addEventListener(TimerEvent.TIMER, onCounting);
timer.start();

Basically I create a simple timer to animate 5 times the MovieClip to different positions. Let’s see how looks onCounting function:

private function onCounting(e:TimerEvent):void
{
	Tweener.addTween(mc, { transition:"easeOutSine", x:Math.random() * stage.stageWidth, y:Math.random() * stage.stageHeight, time:0.5} );
}

It’s a simple animation, I wont cover this deeply than now, just make an idea how your OOP animation will be when you’ll export to video.


Ready to export video

Ok, we know how long is the animation, right? 5 seconds. Go to File > Export > Export Movie. Choose to export Quick Time (.mov), and let’s take a look to the settings panel:

Let’s discuss a little bit these options.
Stop Exporting – since we don’t have animation on Timeline, we need to choose the second option – After time elapsed – here type 5 (seconds).
Store temp data – obviously what does
Ignore stage color – If you don’t want your video to have background and to to keep just animations, you need to choose this option – note that you must don’t have anything on your stage as background, even if it’s a shape, a MovieClip or pictures.

Next, press QuickTime Settings for movie settings.

If you want your movie to have sound, you must check the sound option. Then if you want to make changes on your video, from Video tab press Settings.

If you want have a lower quality movie, from compression type you can choose Animation. If not None, that means your movie will not have compression – also this option will increase your file size. On Frame Rate you can choose 30 frames per second or Current, your current frame used in movie. You can let the key frames on Automatic; now, pay your attention. If you want to export this, with a transparent background for example, from Compressor box, choose depth to Millions of Colors +, if not you can let just Millions of Colors.

Press ok and let’s move to Video Size panel. Always be sure when you export different formats from Flash, to check this option from Dimmensions and to select Current.


Final result

Open the new .mov file created with Quick Time, and see the result. What do you think? A good quality, a video smoothed and cool resolution. Much more, you can export this to TGA sequences, convert to .AVI uncompressed or even a .WMW and .MPEG file, with this .mov file at a great resolution all these options are possible. Let me know what do you think, let me know what technique do you use when you export video files from Flash. Thank you for your time


Twitter Digg Delicious Stumbleupon Technorati Facebook

5 Responses to “How to Export Video from Flash”

  1. Yes export is obvious and only one actual way to do it as I see.
    The problem is to know how to use this export options. When I export 30 Mbt HD swf to mov it gives me 4 Gigabyte mov file. How to manage compression settings: this is the question. :)

  2. @Alex, it’s ok as long as you export this with no compression. After this, convert this .mov file to .flv and everything should be ok, and with a good quality ;)

  3. I’ve been trying to use this way of exporting video for some time now, but I can’t seem to get a smooth animation.. I mean, the video also skips some frames (as the live version does, cause the programmed animations in actionscript are to heavy to be computed in real time)…
    Is there a way to make sure the exporter takes the time to capture each frame of animation correctly?
    Or is there other more complicated way to export?
    I was also hoping to find a way to get Premiere to execute the code in the SWF file when importing it… but I also can’t seem to find a way to do that…
    Thank you!

  4. Please help! :/

    Ive been trying to export my 3 second animation for 3 days now, but no matter what settings I put it to, frame rate, key frame rate etc., the quicktime always comes out 11/12 seconds long! (and I don’t mean, it takes 11 seconds to play because its uncompressed and a bit slow, I mean, its genuinely “check the properties” 11/12 seconds long! :( I’ve no idea how to fix it. I decided to just use png sequences, but then my movie clip drop shadows don’t seem to follow through in those. :/

  5. when you export the file, did you keep the same fps/ or you let this by deafult.