# Rotate Rectangler Image

**URL:** <https://forum.kirupa.com/t/rotate-rectangler-image/331441>\
**Category:** flash\
**Created:** [August 1, 2013, 4:16pm UTC](https://forum.kirupa.com/t/rotate-rectangler-image/331441 "2013-08-01T16:16:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gregmax](https://avatars.discourse-cdn.com/v4/letter/g/ac8455/32.png) [@gregmax](https://forum.kirupa.com/u/gregmax)\
**Post date:** [August 1, 2013, 4:16pm UTC](https://forum.kirupa.com/t/rotate-rectangler-image/331441/1 "2013-08-01T16:16:13Z")

</div>

Hi, I am trying to rotate an image/shape that is in a shape of a rectangle. I want to be able to rotate my image/shape from the top right corner like they do here: [http://www.greensock.com/transformmanageras3/](http://www.greensock.com/transformmanageras3/)

Can someone please provide the small snippet of code to do this? I have the images/shapes center x and y position, and the mouse coordinates, but I can’t figure out the math behind this!

Please, any help is great, thanks!
