|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
使用AdobeActionScript3.0开发高级的交互式项目。设计人员和开发人员可使用它来创建演示文稿、应用程序和其它允许用户交互的内容。
版权声明:转载时请以超链接情势标明文章原始出处和作者信息及本声明
http://wxsr.blogbus.com/logs/33571562.html
/*
bywxsr
1.将导进的属于不异序列的图片批量天生到统一元件按次中
2.为调剂图片的质量为无损位图范例
3.设置该元件链接属性为第一导出基类为MovieClip;
4.公布swf到桌面
*/
fl.getDocumentDOM().getTimeline().currentFrame=0;
fl.getDocumentDOM().selectAll()
fl.outputPanel.clear()
fl.getDocumentDOM().distributeToLayers();
varmyLayers=fl.getDocumentDOM().getTimeline().layers
fl.getDocumentDOM().selectNone();
varobj={}
for(vari=0;i<myLayers.length;i++)
{
if(myLayers[i].frames[0].elements.length>0)
{
varkey=myLayers[i].name.slice(0,myLayers[i].name.length-7)
obj[key]==undefined?obj[key]=[]:;
obj[key].push([myLayers[i].name,i])
}
}
varitems=newArray()
for(varkinobj)
{
obj[k].sort();
varname;
for(varv=0;v<obj[k].length;v++)
{
fl.getDocumentDOM().selection=myLayers[obj[k][v][1]].frames[0].elements
name=obj[k][v][0]
}
fl.getDocumentDOM().convertToSymbol(movieclip,name.slice(0,name.length-7),bottomcenter);
varlib=fl.getDocumentDOM().library;
lib.setItemProperty(linkageExportForAS,true);
lib.setItemProperty(linkageExportInFirstFrame,true);
fl.getDocumentDOM().enterEditMode(inPlace);
//alert(b);
fl.getDocumentDOM().distributeToLayers();
varelementLayers=fl.getDocumentDOM().getTimeline().layers
varelements=newArray
for(varloc_1=0;loc_1<elementLayers.length;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();
varb=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();
varframe=0
for(varloc_2=0;loc_2<4;loc_2++)
{
if(frame<elements.length)
{
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);
}elseif(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
}
vararr=fl.getDocumentDOM().getTimeline().layers
for(varloc_4=1;loc_4<arr.length;loc_4++)
{
fl.getDocumentDOM().getTimeline().setSelectedLayers(1);
fl.getDocumentDOM().getTimeline().deleteLayer(1);
}
fl.getDocumentDOM().exitEditMode();
fl.getDocumentDOM().selectNone();
}
for(vari_2=1;i_2<myLayers.length;i_2++)
{
fl.getDocumentDOM().getTimeline().setSelectedLayers(1);
fl.getDocumentDOM().getTimeline().deleteLayer(1);
}
fl.getDocumentDOM().exportSWF("file:///C:/DocumentsandSettings/AllUsers/桌面/elementsLibs.swf");
您是否有着精彩的Flash作品,您是否想把他转化为屏保程序。 |
|