sn0ski
July 9th, 2003, 07:30 PM
I've stumped myself on this one and the answer is probably right in front of me. Here is a basic map that is masked and bound by the dimensions of the mask (boundary_box). Upon execution the map is at 100% and it is not draggable. pressing the + key enlarges the map and it is now draggable within the limits of the bounding_box). Know the problem..... The - key reduces the map back to 100% and snaps back to it's center position
this._x = _root.bounding_box._x;
this._y = _root.bounding_box._y;
If the map is scaled up and moved to say the upper right corner then reduced, the map scales down based on its current x, y position then snaps back to center. How could I proportionaly scale down and move the map back to center without having any background whitespace?
i.e. as _xscale and _yscale approach 100% this._x & this._y approach _root.bounding_box._x & _root.bounding_box._y
this._x = _root.bounding_box._x;
this._y = _root.bounding_box._y;
If the map is scaled up and moved to say the upper right corner then reduced, the map scales down based on its current x, y position then snaps back to center. How could I proportionaly scale down and move the map back to center without having any background whitespace?
i.e. as _xscale and _yscale approach 100% this._x & this._y approach _root.bounding_box._x & _root.bounding_box._y