# Flip objects horizondally and Vertically using Senocular transform tool

**URL:** <https://forum.kirupa.com/t/flip-objects-horizondally-and-vertically-using-senocular-transform-tool/273409>\
**Category:** flash\
**Created:** [October 15, 2008, 8:38am UTC](https://forum.kirupa.com/t/flip-objects-horizondally-and-vertically-using-senocular-transform-tool/273409 "2008-10-15T08:38:32Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nishadek](https://avatars.discourse-cdn.com/v4/letter/n/3da27b/32.png) [@nishadek](https://forum.kirupa.com/u/nishadek)\
**Post date:** [October 15, 2008, 8:38am UTC](https://forum.kirupa.com/t/flip-objects-horizondally-and-vertically-using-senocular-transform-tool/273409/1 "2008-10-15T08:38:32Z")

</div>

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=-1_matrix.a;  
matrix.tx=dsp.width+dsp.x;  
}  
else  
{  
matrix.a=-1_matrix.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=-1_matrix.d;  
matrix.ty=dsp.y+dsp.height;  
}  
else  
{  
matrix.d=-1_matrix.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

Nishad
