How to save .fla as .xfl by code?

1k views Asked by At

I am using jsfl to save .fla Doc in flash.But I want to save as .xfl(uncompressed document format), and I can't find useful API in jsfl.What should I do?

Thanks!

1

There are 1 answers

1
thirstyClouds On BEST ANSWER

You can use this: fl.getDocumentDOM().saveAsCopy('PathURI / filename.xfl');

Eg. If you'd like to save a fla file's copy as xfl in the same location and with same name, use this:

var newFileName = fl.getDocumentDOM().pathURI.replace('.fla','.xfl');
fl.getDocumentDOM().saveAsCopy(newFileName);