3 Replies Latest reply on Dec 10, 2015 12:46 PM by Jump_Over

    Transform flip horizontal then transform again individually

    owenk44443336

      Hi,

       

      I'm trying to write a script that will apply a transform flip horizontal to the selected items on a page and then apply a transform again individually. I've got a picture and a box and I'm trying to get them to switch places

       

      I've managed to get a script working that will flip the selected items horizontally but I can't figure out how to run the transform again individually so the items aren't backwards.

       

      var doc = app.activeDocument

      var myObj = new Array;

      myObj = app.selection;

      app.activeWindow.activePage.groups.add(myObj);

      app.activeWindow.activePage.groups.item(-1).select();

      var myObj = app.selection[0];
myObj.flipItem(Flip.HORIZONTAL, AnchorPoint.CENTER_ANCHOR);

      myObj.ungroup();

       

      Thanks,

      Owen