jsfl fl.savedocumentas();
题
我正在编写一个JSFL脚本,该脚本调整了FLAS并用附加名称保存各种版本。
我可以使用fl.savedocumentas()获得“保存为”提示,以弹出;
但是我似乎无法获得Flash来生成FLA的新名称。
我只想将“ document.fla”保存为“ document_foo.fla”,(以及后来的“ document_qux.fla”),最好不要以“保存为“提示”中断脚本。
解决方案
谢谢,只需使用fl.savedocument()工作即可。我用它重命名它,然后将Flash的焦点切换到新版本:
var docURI= fl.documents[0].pathURI;// get name&location of current document
var appendName = "_appended.fla";
docURI=docURI.replace(".fla",appendName);//create appended name for new version
//(do stuff to my fla)
fl.saveDocument(fl.documents[0] ,docURI);//save as new doc name
fl.openDocument(docURI);//open this newly saved document
其他提示
您无需使用fl.savedocumentas()。
如果文件从未保存或 尚未修改 由于上次保存,因此未保存文件并返回错误。要保存未保存或未修改的文件,请使用fl.savedocumentas()。
读 - http://help.adobe.com/en_us/flash/cs/extend/ws5b3ccc516d4fbf351e63e3e3d118a9024f3f-7d12.html
每次修改后只需使用fl.savedocument即可。
不隶属于 StackOverflow