[great new thread starter]
we really need to have a sticky per game genre. in a clean thread. that would be awesome
anyway, [problem]
i need to zoom in a MC, while focusing a known object... let's say yyyMC inside the xxxMC (xxxMC is located at 0;0)
the zoom code i wrote:
code:
// load
proportion = this.xxxMC._height/this.xxxMC._width;
zoom_value = 100;
// loop
this.onEnterFrame = function() {
this.xxxMC._width++;
this.xxxMC._height = this.xxxMC._width*proportion;
zoom_value--;
if (zoom_value==0) {
delete this.onEnterFrame;
}
};
^ here, the image will be zooming during 100 frames...
now my question is: how to focus on this.xxxMC.yyyMC? so that it's located in the middle of the window when the zoom is finished?
say i catch its _x/_y values on load
code:
px = this.xxxMC.yyyMC._x
py = this.xxxMC.yyyMC._y
but what's next...? sure, it's simple, but... where is my logic!?! ;)
thanks for the answers...
