# Transform Matrix Math help

**URL:** <https://forum.kirupa.com/t/transform-matrix-math-help/274628>\
**Category:** Uncategorized\
**Created:** [November 1, 2008, 3:37pm UTC](https://forum.kirupa.com/t/transform-matrix-math-help/274628 "2008-11-01T15:37:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![zoink](https://avatars.discourse-cdn.com/v4/letter/z/9d8465/32.png) [@zoink](https://forum.kirupa.com/u/zoink)\
**Post date:** [November 1, 2008, 3:37pm UTC](https://forum.kirupa.com/t/transform-matrix-math-help/274628/1 "2008-11-01T15:37:17Z")

</div>

How exactly does the movieclip.transform.matrix.rotate work?

I mean, if the movieclip is at 0,0, the movieclip.transform.matrix.rotate will rotate the movieclip with 0,0 as it’s pivot… but i dont get it’s behavior if the movieclip is not at 0,0. for example:

var example\_mc = new MovieClip();  
addChild(example\_mc);  
example\_mc.x = 275;  
example\_mc.y = 200;

var mtrx = example\_mc.transform.matrix;  
mtrx.rotate(deg2rad(90));  
example\_mc.transform.matrix = mtrx;

(deg2rad is a function that converts degrees to radians)

after this code, example\_mc.x becomes -200, and example\_mc.y becomes 275. Can you explain (with some math perhaps) how the movieclip was rotated? Apparently… the movieclip isn’t being rotated at the point (275,200)…
