I have an image that I has has didfferent areas I want people to zoom in on. I need the area that is clicked on to be brought to the centre of the flash stage and then after that tween scaled by 200%.
I so far have this actionscript that brings the object to the centre of the flash stage.
import mx.transitions.Tween;
import mx.transitions.easing.*;
var xpos = 290-_xmouse;
var ypos = 320-_ymouse;
var xPosT:Tween = new Tween(kText, "_x", Regular.easeOut, 20, xpos, 1, true);
var yPosT:Tween = new Tween(kText, "_y", Regular.easeOut, 120,ypos, 1, true);
However, I am having problems with the scaling. If I use this
var xScaleT:Tween = new Tween(kText, "_xscale", Regular.easeOut, 100, 200, 1, true);
var yScaleT:Tween = new Tween(kText, "_yscale", Regular.easeOut, 100, 200, 1, true);
The selected area moves away from the centre of the stage due to the up-scaling.
Is there a way to scale an object about a different reference point rather than the upper left corner of the tweening movieclip. If I scaled it about the coordinates for the centre of the stage then the selected area would remain in the centre.
Or is there a better way to do a zoom effect?