I have had some help but still not understanding this.
How can I scale an object from center after it is dragged by the user?
Currently I have this:
function onSliderChange(e:SliderEvent):void
{
scaleClip(slider.value);
}
function scaleClip(val:int):void
{
var trueScl:Number = val/100;
holder_mc.scaleX = holder_mc.scaleY = trueScl;
holder_mc.x = clipNativeX-(holder_mc.width/2);
holder_mc.y = clipNativeY-(holder_mc.height/2);
defineCrop()
}
With this code the movieclip jumps back to the center of the stage each time I call the scaleClip() (move the slider). I would like the object to scale from it’s own center regardless of where it is on the stage.
Any help is greatly appreciated!