Solved

Batch Publishing in Flash JSFL

Posted on 2009-07-15
1
456 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction This article is primarily concerned with ActionScript 3 and generally specific to AVM2.  Most suggestions would apply to ActionScript 2 as well, and I've noted those tips that differ between AS2 and AS3. With the advent of ActionS…
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
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.

792 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