# Rotate movieclip at center and move car simutaniously

**URL:** https://forum.kirupa.com/t/rotate-movieclip-at-center-and-move-car-simutaniously/329665
**Category:** Uncategorized
**Created:** [September 30, 2012, 6:06am UTC](https://forum.kirupa.com/t/rotate-movieclip-at-center-and-move-car-simutaniously/329665 "2012-09-30T06:06:59Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![GeekTweak\_0](https://avatars.discourse-cdn.com/v4/letter/g/b5ac83/32.png) [@GeekTweak\_0](https://forum.kirupa.com/u/GeekTweak_0)
#### Post date: [September 30, 2012, 6:06am UTC](https://forum.kirupa.com/t/rotate-movieclip-at-center-and-move-car-simutaniously/329665/1 "2012-09-30T06:06:59Z")

</div>

Here is my code:

```auto
var m:Matrix = car.transform.matrix;
var point:Point = new Point(car.width/2, car.height/2);
point = m.transformPoint(point);

function spinOut(e:TimerEvent)
{
    m.translate( -point.x, -point.y);
    m.rotate(10 * (Math.PI / 180));  
    m.translate(point.x, point.y);  
    car.transform.matrix = m;
    car.x += 20;
    car.y -= 3;
}

```

the lines: \*\*car.x += 20; \*\*and **car.y -= 3;** show no affect, and the movieclip \*jumps \*back to its original position. (this timer is started after the movieclips x/y values exceed some number);

thanks in advance.
