Hey all,
Trying to fine tune, if possible, a drag scale movie clip functionality. I’m trying to get it to scale on the arrow instead of the whole image. Here is the code…
var OnScale:Boolean;
display01A.imageBg.imgArw.addEventListener(MouseEvent.MOUSE_DOWN, sclStart, false, 0, true);
this.display01A.addEventListener(MouseEvent.MOUSE_UP, sclStop, false, 0, true);
this.display01A.addEventListener(Event.ENTER_FRAME, onLoop, false, 0, true);
function sclStart(evt:MouseEvent):void {(OnScale=true);
}
function sclStop(evt:MouseEvent):void {(OnScale=false);
}
function onLoop(evt:Event):void {
if (OnScale)
{
this.display01A.width = Math.max(mouseX - this.x, 10);
this.display01A.height = Math.max(mouseY - this.y, 10);
( this.display01A.scaleX > this.display01A.scaleY ) ? this.display01A.scaleY = this.display01A.scaleX : this.display01A.scaleX = this.display01A.scaleY;
}
}
I can provide an fla if desired. Thanks in advance.