Try below code: function applyTM(tg, a, b, c, d) { var tm = new Matrix(); tm.mValueA = a; tm.mValueB = b; tm.mValueC = c; tm.mValueD = d; tm.mValueTX = 0; tm.mValueTY = 0; tg.transform(tm,true,true,true,true,1); app.redraw(); } applyTM (app.activeDocument.selection[0],-1,0,0,1); if you want to transform horizontal: applyTM (app.activeDocument.selection[0],1,0,0,-1); Ten
... View more