Scaling from the center in flash
问题 I am using flash (AS3) and have a dynamic movie clip that I want to scale up or down using a slider bar. I have this working very well using the scaleX and scaleY functions. The only trouble is that these scale from the left hand side of the document and I would like it to be scaled from the center Any help is appreciated. 回答1: function scaleFromCenter(dis:*, sX:Number, sY:Number):void { var prevW:Number = dis.width; var prevH:Number = dis.height; dis.scaleX = sX; dis.scaleY = sY; dis.x +=