Solved

Batch Publishing in Flash JSFL

Posted on 2009-07-15
1
455 Views
Last Modified: 2012-05-07
Hi Folks,

I have multiple FLA's in a folder. I want all the FLAs to be published to Flash Player 9 and AS2 and sound set to 48 kbps.

How do I do it with JSFL. Any code help is appreciated.

Thanks

RG
0
Comment
Question by:rgarimella
1 Comment
 
LVL 9

Accepted Solution

by:
danyul_c earned 500 total points
ID: 24887749
First of all you will need to set your publish settings up as an xml file. (just create them in flash then save/export them, i forget the exact option)

Then try the code I've put below for your jsfl.

Please don't have anything open that you have not saved because I've written this to close everything. It will also not prompt to save changes after publishing each doc.

This is also all off the top of my head. I use this stuff at work and haven't written one for a while. The ony thing that *may* note work is the line where it says var doc = fl.openDocument becuase I'm not sure if the file list returns just the file names OR the entire URI for that file.

Let me know ;)
var folderUri  = 'file:///C|/temp/flas/*.fla"'
var publishXml = 'file:///C|/temp/publishsettings.xml';
var fileExt    = '*.fla';
var fileList   = FLfile.listFolder(folderUri, 'files');
 
fl.closeAll(false);
 
for (i = 0; i < fileList.length; i++) {
  var doc = fl.openDocument(folderUri + fileList[i]);
  doc.importPublishProfile(publishXml);
  doc.publish();
  doc.close(false);
}

Open in new window

0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I know the transition can be hard. We got used to the ease of use ActionScript 2 had, but honestly, it became problematic later on, especially if designers were involved in the project and found it easy to add code as they saw fit. So, this artic…
I have been doing hardcore actionscripting for some time; and needless to say I have faced a lot of problems in just understanding others' code rather than understanding what the code executes. A programmer's life can become hell when there are a lo…
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question