skew image with matrix, top angle good, bottom flat
Hello:
I am trying to skew an spark Image object using a matrix. The problem I am having is that it only effects the top angle. I think it may be related to the position of the image (x and y). The top angle is prefect but the bottom is flat!
Here is a bit of code:
//imgA = pixles down from top left coord, I used arctan with oposite over adjacent to get a radian angle
//size
openImage.width = imgW; //say 200
openImage.height = imgH; //say like 300
//angle & poisition
var ooa:Number = (imgA / imgW); //perhaps 20 / 200
var angle:Number = Math.atan(ooa);
var m:Matrix = new Matrix();
m.tx = imgX; //over 400
m.ty = imgY; //down 500
m.b = angle;
openImage.transform.matrix = m;
Thanks!