Hi,
I am using the senocular transform tool for scaling, rotating etc… skew is disabled in the tool. I Have tried many ways to flip the display object horizontally and vertically. he function I am using is given below. It works fine when the display object is not rotated. When it is rotated and then flipped it outputs a skewed inverted display Object. I would appreciate it very much if anyone could find a way around this issue.
function flipHorizontal(dsp:DisplayObject):void
{
var matrix:Matrix = dsp.transform.matrix;
matrix.transformPoint(new Point(dsp.width/2,dsp.height/2));
if(matrix.a>0){
matrix.a=-1matrix.a;
matrix.tx=dsp.width+dsp.x;
}
else
{
matrix.a=-1matrix.a;
matrix.tx=dsp.x-dsp.width;
}
dsp.transform.matrix=matrix;
}
function flipVertical(dsp:DisplayObject):void
{
var matrix:Matrix = dsp.transform.matrix;
matrix.transformPoint(new Point(dsp.width/2,dsp.height/2));
if(matrix.d>0){
matrix.d=-1matrix.d;
matrix.ty=dsp.y+dsp.height;
}
else
{
matrix.d=-1matrix.d;
matrix.ty=dsp.y-dsp.height;
}
dsp.transform.matrix=matrix;
}
I would appreciate it very much if anyone could find a way around this issue.
Thx in advance
NishadD