Export multiple .fla files using .jsfl

Another very basic information. I had to export multiple .fla files so I wrote my first .jsfl file:

// Binary Directory path (file:// syntax)
var binDir = "file:///Users/.../swf/";
// Source Directory path (file:// syntax)
var srcDir = "file:///Users/.../fla/";
// .fla file names
var fileNames = new Array( "file1", "file2", "file3" );
 
var fileName;
var fileSrc;
var fileBin;
var fla;
 
for ( var i = 0; i < fileNames.length; i++ )
{
	fileName = fileNames[ i ];
	fileSrc = srcDir + fileName + ".fla";
	fileBin = binDir + fileName + ".swf";
 
	fla = fl.openDocument( fileSrc );
	fla.exportSWF( fileBin, true ); 
 
	fl.closeDocument( fla, false );
}

This entry was posted in Flash, JSFL. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">