Copy link to clipboard
Looking for a way to code, "When Dragged On Image, Push, Pull, Stretch pixels.I want to be able to distort images I publish by Click & Dragging and via Mouse Wheel. Would be ideal if: Drag to stretch, and mouse wheel to scale images. Signed: Clueless
I'm not sure if this would do it for you, and I don't know how to use the mouse wheel as a programmatic input device -- never done that before.
But, I'd make the image as a MovieClip (MC): call it mainImage. I'd make another graphic object as MC that acts a "dragging handle,": call it draggingHandle.
I'd put draggingHandle on top of the edge of mainImage.
This code should work:
var mainImageOrigWidth = mainImage.width;
mainImage.scaleX = (draggingHandle.x - mainImage.x) / mainImage.width;