Zoom hacia y desde el punto

Estoy tratando de ampliar un objeto DisplayObject en un determinado punto. Pensé que sería fácil, pero me he pasado un día tratando de resolverlo.

Básicamente, creo que estodebería trabajo. El énfasis debe ser.

//newPoint is the point being centered. There is no initial scaling, so I do not need to compensate for that (yet)
//scale is the zoom level
//container is the parent of the obj
//obj is the object being scaled/panned
var p:Point = new Point(
    ( this.container.width - this.obj.width * scale + newPoint.x * scale ) / 2, 
    ( this.container.height - this.obj.height * scale + newPoint.y * scale ) / 2 
);

this.obj.scaleX = this.obj.scaleY = scale;
this.obj.x = p.x;
this.obj.y = p.y;

Centra el punto si la escala es 1, pero se aleja cada vez más del centro a medida que aumenta la escala. He probado docenas de métodos diferentes.Este método, que he visto en varios sitios, produjo los mismos resultados exactos. ¿Alguien tiene alguna idea de cómo hacer que esto funcione?

EDITAR 10-1-12: Como seguimiento, tomé lafragmento de código que LondonDrugs_MediaServices proporcionó como base para mi problema original. Necesitaba poder hacer zoom en un punto específico en una escala específica en relación con la imagen sin escala (piense en cómo Google Maps se acerca a una ubicación específica). Para hacer esto, tuve que centrar mi imagen en el punto antes de ejecutar el código de traducción. He publicado el código adicional a continuación. Para otros usos (pellizcar para ampliar, desplazar y hacer doble clic), utilicé el código provisto por Vesper, que funcionó bastante bien.

//obj is the object being translated
//container is its parent
//x and y are the coordinates to be zoomed to, in untranslated scaling
//obj.scaleX and obj.scaleY are always identical in my class, so there is no need to account for that


//calculates current center point, with scaling
var center:Point = new Point( ( this.container.width - this.obj.width * this.obj.scaleX ) / 2, ( this.container.height - this.obj.height * this.obj.scaleX ) / 2 );

//calulcates the distance from center the point is, with scaling
var distanceFromCenter:Point = new Point( this.obj.width * this.obj.scaleX / 2 - x * this.obj.scaleX, this.obj.height * this.obj.scaleX / 2 - y * this.obj.scaleX );

//center the object on that specific point
this.obj.x = center.x + distanceFromCenter.x;
this.obj.y = center.y + distanceFromCenter.y;

Respuestas a la pregunta(4)

Su respuesta a la pregunta