Matrix Rotation around a point.... drifting?

Hi all,

So I’m trying to rotate a movieclip which is of class Tire around a specific point using matrix rotation.

The clip itself has it’s transformation point at 0,0 and is 15 wide by 30 high.

I would like to rotate it around the point (15, 15) in it’s local space or (0, 5) in it’s parent space which is half way down the right edge.

I’m using the following code within the Tire class so that it can rotate itself.



var rotationMatrix:Matrix = this.transform.matrix;
        
rotationMatrix.tx -= __rotationPoint.locX;
rotationMatrix.ty -= __rotationPoint.locY;
rotationMatrix.rotate (_degrees*(Math.PI/180));
rotationMatrix.tx += __rotationPoint.locX;
rotationMatrix.ty += __rotationPoint.locY;
    
this.transform.matrix = rotationMatrix;

However, after each rotation, I end up getting some drift and the movieclip moves down and to the right.

Any idea what I’m doing wrong?

Thanks