PDA

View Full Version : can you use jsfl to export jpegs?


barry
03-31-2006, 01:17 PM
Hi all,

i'm using exportSWF to create 100 different swfs from a single fla, exporting different movieClips from the library.

i'm hoping to use the same method to produce jpegs instead of swfs but as far as i can see it is not possble to produce these from a single fla.

Is the only solution to select jpeg in my publish settings and then in my jsfl get the file to resave itself on every loop, resulting in me having 100 different fla's. This just seems like a messy way to do it.


var i = 0;


while( i < 100 )
{
var doc = getDocumentDOM();

doc.publish();
var fileName = "file:///c/My Documents/test/myFile_"+i;
doc.saveDocument(doc,fileName);

i++;
}

cheers,

barry

androo_animator
03-31-2006, 03:54 PM
Why is it saving 100 fla's if your publish profile is set to save jpg?

barry
03-31-2006, 04:47 PM
hi androo,

because i have to resave each doc as a new fla before i publish it so that the file name is unique, which makes the jpeg name unique.

is this wrong? i had a feeling it might be, but had a look at the document.publishProfiles property and couldn't see a way of dynamically changing the jpeg name.

is it possible to change the jpeg name in the profile settings in jsfl so that a unique image can be saved each time without having to create a new fla?

james

mrand01
03-31-2006, 07:07 PM
i had a script once that would import around 100 jpegs and export them to swfs. Not exactly what you're trying to do, but I'm sure w/ some work you cna make it export jpegs. I'll have to check in to this...