Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
AS3 Scale Around Point
function scaleAroundPoint(target:DisplayObject, point:Point, scaleFactor:Number):void
{
var m:Matrix = target.transform.matrix;
m.translate( -point.x, -point.y );
m.scale( scaleFactor, scaleFactor);
m.translate( point.x, point.y );
target.transform.matrix = m;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment