So I’ve been working on a being able to click on an image and zoom it to that position.
my movie is 550x340. just make a mc with an image and give it the linkage ID of “box_mc”. I put a crosshair in that MC as well so i can see where it zooms to.
The problem I’m having is that on the third click, it won’t adjust correctly. I don’t understand why not. Maybe you people can aid a little.
_root.attachMovie("box_mc","box_mc",this.getNextHighestDepth());
MovieClip.prototype.scaler = function(nValue) {
nValue *= this._height;
if (this._height<nValue) {
ratio = this._height/nValue;
this._xscale = this._yscale /= ratio;
} else {
ratio = nValue/this._height;
this._xscale = this._yscale *= ratio;
}
};
var mX = 0;
var mY = 0;
box_mc.onPress = function(){
mX += _xmouse;
mY += _ymouse;
this.scaler(2);
this._x -= mX;
this._y -= mY;
}