途中まで書いたのに消えた
xfl の /bin/*.dat氏ね、と思っているあなたのために
xflのディレクトリのDOMDocument.xmlの中に
DOMBitmapItem name="hoge/dummy.png" itemID="52d27d94-00001f5c" sourceExternalFilepath="../png/dummy.png" sourceLastImported="1385281771" sourcePlatform="macintosh" originalCompressionType="lossless" quality="50" href="hoge/dummy.png" bitmapDataHRef="M 2 1389525958.dat" frameRight="11140" frameBottom="11620"
このへんがあるのでsourceExternalFilepathを適当なpngのpathとかに書き換えてやる.
その後jsflでlibraryitemのupdate
fl.outputPanel.clear();
fl.trace("start script export all bitmap ");
var doc = fl.getDocumentDOM();
var library = doc.library;
var itemArray = library.items;
var s = "";
var item;
for(var i=0; i < itemArray.length;i++){
item = itemArray[i];
doc.library.selectItem(item.name);
var selItems = fl.getDocumentDOM().library.getSelectedItems();
if("bitmap" == selItems[0].itemType){
//item.exportToFile(imagepathURL + item.name);
fl.getDocumentDOM().library.updateItem();
fl.trace("export and update bitmap !" + selItems[0].name);
}
}
fl.trace("finish script export all bitmap ");
xfl の /bin/*.dat氏ね、と思っているあなたのために
xflのディレクトリのDOMDocument.xmlの中に
DOMBitmapItem name="hoge/dummy.png" itemID="52d27d94-00001f5c" sourceExternalFilepath="../png/dummy.png" sourceLastImported="1385281771" sourcePlatform="macintosh" originalCompressionType="lossless" quality="50" href="hoge/dummy.png" bitmapDataHRef="M 2 1389525958.dat" frameRight="11140" frameBottom="11620"
その後jsflでlibraryitemのupdate
fl.outputPanel.clear();
fl.trace("start script export all bitmap ");
var doc = fl.getDocumentDOM();
var library = doc.library;
var itemArray = library.items;
var s = "";
var item;
for(var i=0; i < itemArray.length;i++){
item = itemArray[i];
doc.library.selectItem(item.name);
var selItems = fl.getDocumentDOM().library.getSelectedItems();
if("bitmap" == selItems[0].itemType){
//item.exportToFile(imagepathURL + item.name);
fl.getDocumentDOM().library.updateItem();
fl.trace("export and update bitmap !" + selItems[0].name);
}
}
fl.trace("finish script export all bitmap ");
0 件のコメント:
コメントを投稿