layer resize and move script error problem
i made this script
size change is good
but i postion is error
i would like to make same posion ?
pls can you say porblem?
var doc = activeDocument;
var t = doc.artLayers.getByName("or");
var a = doc.artLayers.getByName("de");
var textHeight = t.bounds[3].value - t.bounds[1].value;
var artHeight = a.bounds[3].value - a.bounds[1].value;
var textwidth = t.bounds[2].value - t.bounds[0].value;
var artwidth = a.bounds[2].value - a.bounds[0].value;
a.resize(textwidth/artwidth*100, textHeight/artHeight*100, AnchorPosition.MIDDLECENTER);
var width = t.bounds[3]-a.bounds[3];
var length = t.bounds[2]-a.bounds[2];
a.translate( width, length )
