found this....
if you can add the item you want to move to a selection it becomes easier.
for example if you have something selected, then you can use this.
// first get the current position of the selected item
var sel = fl.getDocumentDOM().selection[0];
previousLeft=sel.left;
previousTop=sel.top;
..... then you have the new x and y places,
you must calculate how much positive or negative difference
between the old places and the new places has.
after you know how much you much add or remove from
the x and y positions, use them like this
fl.getDocumentDOM().moveSelectionBy({x:100, y:-100});
in the example the item on the stage moves 100 pixels right from its current position and 100 pixels up from the current y position
|