我正在编写一个JSFL脚本,用于调整flas的大小并保存各种版本,以及附加的名称。
我可以使用fl.saveDocumentAs()弹出“另存为”提示;
但我似乎不能让flash为FLA生成一个新的名称。
我只想将"document.fla“另存为"document_foo.fla”(以及后来的"document_qux.fla"),最好不要用“另存为”提示中断脚本。
发布于 2011-12-09 06:50:08
谢谢,只要使用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发布于 2011-11-29 16:44:59
您不需要使用fl.saveDocumentAs()。
如果文件自上次保存以来从未保存过或从未修改过,则不保存该文件并返回false。若要允许保存未保存或未修改的文件,请使用fl.saveDocumentAs()。
Read - http://help.adobe.com/en_US/flash/cs/extend/WS5b3ccc516d4fbf351e63e3d118a9024f3f-7d12.html
只需在每次修改后使用fl.saveDocument。
https://stackoverflow.com/questions/7801133
复制相似问题