Solved

Batch Publishing in Flash JSFL

Posted on 2009-07-15
1
452 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
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
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 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.

772 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now