[Extendflash] Soften Fill Edges
Brooks Andrus
bandrus at bresnan.net
Mon Jul 11 16:06:00 PDT 2005
Seeing as Keith is on this list and the small chunk I know about JSFL is
stolen straight from his book (I did purchase the sucker though, so he must
of gotten at least 5 bones from the pillaging). I'll just post the command
in question that I'd like to add the soften fill edges to--should be
apparent why jsfl api would be nice to have.
var curr_doc = fl.getDocumentDOM();
var root_tl = curr_doc.getTimeline();
var trace = fl.outputPanel.trace;
curr_doc.convertToSymbol("movie clip", "", "top left");
curr_doc.enterEditMode("inPlace");
var w = curr_doc.selection[0].width;
var h = curr_doc.selection[0].height;
curr_doc.selectNone();
var stl = curr_doc.getTimeline();
stl.layers[0].name = "image";
stl.layers[0].locked = true;
stl.addNewLayer("mask");
stl.setSelectedLayers[0];
curr_doc.addNewRectangle({left:0,top:0,right:w,bottom:h},12,false,true);
curr_doc.selectAll();
curr_doc.align("left",true);
curr_doc.align("top",true);
stl.layers[0].layerType = "mask";
stl.layers[0].locked = true;
stl.layers[1].layerType = "masked";
stl.addNewLayer("stroke");
stl.setSelectedLayers[0];
curr_doc.addNewRectangle({left:0,top:0,right:w,bottom:h},12,true,false);
curr_doc.selectAll();
curr_doc.align("left",true);
curr_doc.align("top",true);
curr_doc.setStrokeColor(0x333333);
curr_doc.setStrokeSize(2);
curr_doc.convertLinesToFills();
stl.layers[0].locked = true;
stl.addNewLayer("shadow");
stl.setSelectedLayers[0];
curr_doc.addNewRectangle({left:0,top:0,right:w,bottom:h},12,false,true);
curr_doc.selectAll();
curr_doc.align("left",true);
curr_doc.align("top",true);
curr_doc.setFillColor('#85858599');
curr_doc.moveSelectionBy({x:6,y:6});
stl.reorderLayer(0,3,false);
stl.layers[3].layerType = "normal";
Brooks
More information about the Extendflash
mailing list