Search code examples
flashjsflxfl

How to save .fla as .xfl by code?


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!


Solution

  • 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);