最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
flash as 将图片批量导入到位一帧
时间:2022-07-02 17:02:22 编辑:袖梨 来源:一聚教程网
fl.getDocumentDOM().getTimeline().currentFrame = 0;
fl.getDocumentDOM().selectAll()
fl.outputPanel.clear()
fl.getDocumentDOM().distributeToLayers();
var myLayers=fl.getDocumentDOM().getTimeline().layers
fl.getDocumentDOM().selectNone();
var obj={}
for(var i=0;i
if(myLayers[i].frames[0].elements.length>0)
{
var key=myLayers[i].name.slice(0,myLayers[i].name.length-7)
obj[key]==undefined?obj[key]=[]:'';
obj[key].push([myLayers[i].name,i])
}
}
var items=new Array()
for(var k in obj)
{
obj[k].sort();
var name;
for(var v=0;v
fl.getDocumentDOM().selection=myLayers[obj[k][v][1]].frames[0].elements
name=obj[k][v][0]
}
fl.getDocumentDOM().convertToSymbol('movie clip',name.slice(0,name.length-7), 'bottom center');
var lib = fl.getDocumentDOM().library;
lib.setItemProperty('linkageExportForAS', true);
lib.setItemProperty('linkageExportInFirstFrame', true);
fl.getDocumentDOM().enterEditMode('inPlace');
//alert(b);
fl.getDocumentDOM().distributeToLayers();
var elementLayers=fl.getDocumentDOM().getTimeline().layers
var elements=new Array
for(var loc_1=0;loc_1
if(elementLayers[loc_1].frames[0].elements.length==0)
{
fl.getDocumentDOM().getTimeline().setSelectedLayers(0);
fl.getDocumentDOM().getTimeline().setSelectedFrames(0,0);
fl.actionsPanel.getScriptAssistMode();
var b=fl.actionsPanel.setText("stop();")
fl.getDocumentDOM().getTimeline().insertKeyframe(1)
fl.getDocumentDOM().getTimeline().insertKeyframe(2)
fl.getDocumentDOM().getTimeline().insertKeyframe(3)
}else {
elements.push([elementLayers[loc_1].name,loc_1])
}
}
elements.sort();
var frame=0
for(var loc_2=0;loc_2<4;loc_2++)
{
if(frame
fl.getDocumentDOM().getTimeline().setSelectedLayers(elements[loc_2][1]);
fl.getDocumentDOM().getTimeline().setSelectedFrames(0,0);
fl.getDocumentDOM().getTimeline().cutFrames(0);
}else {
if(elements.length==2&&frame>1){
fl.trace(frame+'---'+elements.length)
if(frame==2){
fl.getDocumentDOM().getTimeline().setSelectedLayers(0);
fl.getDocumentDOM().getTimeline().setSelectedFrames(0,0);
fl.getDocumentDOM().getTimeline().copyFrames(0);
}else if(frame==3){
fl.getDocumentDOM().getTimeline().setSelectedLayers(0);
fl.getDocumentDOM().getTimeline().setSelectedFrames(1,1);
fl.getDocumentDOM().getTimeline().copyFrames(1);
}
}
}
fl.getDocumentDOM().getTimeline().setSelectedLayers(0);
fl.getDocumentDOM().getTimeline().setSelectedFrames(frame,frame);
fl.getDocumentDOM().getTimeline().pasteFrames(frame);
frame+=1
}
var arr=fl.getDocumentDOM().getTimeline().layers
for(var loc_4=1;loc_4
fl.getDocumentDOM().getTimeline().setSelectedLayers(1);
fl.getDocumentDOM().getTimeline().deleteLayer(1);
}
fl.getDocumentDOM().exitEditMode();
fl.getDocumentDOM().selectNone();
}
for(var i_2=1;i_2
fl.getDocumentDOM().getTimeline().setSelectedLayers(1);
fl.getDocumentDOM().getTimeline().deleteLayer(1);
}
fl.getDocumentDOM().exportSWF(" http://www.111com.net/elementsLibs.swf ");
相关文章
- 人们熟悉的寄居蟹属于以下哪种分类 神奇海洋11月21日答案 11-21
- 第五人格11.22共研服有什么更新 11月22日共研服更新内容介绍 11-21
- 原神恰斯卡怎么培养 11-21
- 无期迷途四星装束是谁 11-21
- 王者荣耀帝丹高中校服怎么获得 11-21
- 光遇姆明季后续版本怎么玩 11-21