SWFEncoder.as Posted Tue, 01/19/2010 - 15:14 by Ionel ActionScript: ActionScript 3 This class can create SWF animations directly from the Flash Player. All it does right now is create image animations with full transparency and the ammount of frames each image will be seen. I needed to create swf files on the fly in a project I am working on, but just to create simple animations with images, not the full set of features you could find in a regular swf file. It still needs some adjustments to increase performance, but at least gets the job done. All the needed documentation about the swf format can be found in the official Adobe file format specification document. Download source code here. Usage import ion.utils.swf.SWFEncoder; import flash.utils.ByteArray; var swf:SWFEncoder = new SWFEncoder(); swf.setBackgroundColor(0xffffff); swf.setFrameRate(12); swf.setSize(320, 240); swf.addImage(BitmapData, 5); // BitmapData image, number of frames visible var bytes:ByteArray = swf.serialize(); http://www.ionsden.com/content/swfencoder