/* Round x and y coords of selected objects Brian Matthews; slapthink.net */ var theSelectionArray = fl.getDocumentDOM().selection; var num = theSelectionArray.length; for(var i=0; i< num; i++) { var item = theSelectionArray[i]; item.y = Math.round(item.y); item.x = Math.round(item.x); } fl.trace('number of objects affected: ' + num);