
Код:
if (!fl.getDocumentDOM().library.itemExists("tile")) {
fl.getDocumentDOM().library.addNewItem("movie clip", "tile");
}
fl.getDocumentDOM().library.editItem ("tile");
for (i = 1; i < 1001; i++){
obj = {};
obj.x = (Math.random () * 300) >> 0;
obj.y = (Math.random () * 300) >> 0;
angle = Math.random () * 360 * Math.PI / 180;
fl.getDocumentDOM().library.addItemToDocument (obj, "ps" + (Math.random () * 30) >> 0);
fl.getDocumentDOM().selectAll();
sel = fl.getDocumentDOM().selection[0];
matrix = sel.matrix;
matrix.a = Math.cos (angle);
matrix.b = Math.sin (angle);
matrix.c = -Math.sin (angle);
matrix.d = Math.cos (angle);
sel.matrix = matrix;
}