- //打开fla
- var _openDOC = fl.openDocument("file:///E|TE/爱.fla");
-
- //获取图层4的总帧
- var _Length=fl.getDocumentDOM().getTimeline().layers[3].frames.length;
//全锁
fl.getDocumentDOM().getTimeline().setLayerProperty('locked', true, 'all');
fl.getDocumentDOM().getTimeline().setLayerProperty('visible', false, 'all');
//全开
fl.getDocumentDOM().getTimeline().setLayerProperty('locked', false, 'all');
fl.getDocumentDOM().getTimeline().setLayerProperty('visible', true, 'all');
- //选中图层3 并设置开锁可见状态
- fl.getDocumentDOM().getTimeline().setSelectedLayers(2);
- fl.getDocumentDOM().getTimeline().setLayerProperty('locked', false);
- fl.getDocumentDOM().getTimeline().setLayerProperty('visible', !false);
-
- //选中图层4的所有帧 用来选中特定帧,选择第二帧 setSelectedFrames(1, 1);选择第三帧 setSelectedFrames(3, 3);
- fl.getDocumentDOM().getTimeline().setSelectedFrames(0, _Length);
-
- //选择当前所有开锁可见的图层内容
- //fl.getDocumentDOM().selectAll();
-
-
- //将选择区转为影片剪辑,注意全帧,只会将第一帧转
- //var newMc=fl.getDocumentDOM().convertToSymbol('movie clip', '', 'top left');
- //var lib = fl.getDocumentDOM().library;
- //if (lib.getItemProperty('linkageImportForRS') == true) {
- // lib.setItemProperty('linkageImportForRS', false);
- // }else {
- // lib.setItemProperty('linkageExportForAS', false);
- // lib.setItemProperty('linkageExportForRS', false);
- // }
- //lib.setItemProperty('scalingGrid', false);
- //fl.getDocumentDOM().getTimeline().layers[2].frames[0].elements[0].name = "bg_mc";