Solved

Batch Publishing in Flash JSFL

Posted on 2009-07-15
1
461 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enroll in June's Course of the Month

June's Course of the Month is now available! Every 10 seconds, a consumer gets hit with ransomware. Refresh your knowledge of ransomware best practices by enrolling in this month's complimentary course for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

I come across a lot of question about how to access things in the document class from a movieclip, or accessing something from a movieclip in the document class. It took me a while to figure this out but once I did it makes life so much easier. …
This article describes a solution to a problem of subloading one movie into another when they have different SWF versions. Sometime back, I was working on an ActionScript project while I came across an interesting fact which I would like to share…
The goal of the tutorial is to teach the user how to how to record live broadcast.
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.

728 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