/*---------------------------------------------------------------------------------------------------- // posRound - 4dut_posRound.jsfl // version 1.0 // 2007/09/10 // copyright 4digit co.,ltd. //--------------------------------------------------------------------------------------------------*/ var dom = fl.getDocumentDOM(); for(var i = 0; i < dom.selection.length; i++){ var sel = dom.selection[i]; if(sel.elementType == "shape"){ sel.x = Math.round(sel.x-sel.width/2)+sel.width/2; sel.y = Math.round(sel.y-sel.height/2)+sel.height/2; }else{ sel.x = Math.round(sel.x); sel.y = Math.round(sel.y); } }