Zoom para e do ponto

Estou tentando ampliar um DisplayObject em um determinado ponto. Eu imaginei que seria fácil, mas passei um dia tentando entender.

Basicamente, acho que issodevemos trabalhos. Ênfase no deveria.

//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;

Centraliza o ponto se a escala for 1, mas fica cada vez mais longe do centro à medida que você aumenta a escala. Eu tentei dezenas de métodos diferentes.Este método, que tenho visto em vários sites, produziu os mesmos resultados exatos. Alguém tem alguma idéia de como fazer isso funcionar?

EDITAR 10-1-12: Como acompanhamento, tomei ofragmento de código que LondonDrugs_MediaServices forneceu como base para o meu problema original. Eu precisava ser capaz de aplicar zoom em um ponto específico em uma escala específica em relação à imagem sem escala (pense em como o Google Maps faz o zoom para um local específico). Para fazer isso, tive que centralizar minha imagem no ponto antes de executar o código de tradução. Eu postei o código adicional abaixo. Para outros usos (apertar para zoom, rolagem e duplo clique), usei o código fornecido pela Vesper, que funcionou muito bem.

//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;

questionAnswers(4)

yourAnswerToTheQuestion