Hi all, this is just what should be a simple trigonometry question for you.
I have a project which will allow the user to upload an image, drag it within a certain area, and rotate it.
The trouble is, that the user is allowed to rotate the image. When they do, then because the area is defined by the width of the rotated image, then the image will not go as far as it’s boundary, or it will cross over it’s boundary.
I have searched the web for a solution, and have found nothing.
I am currently thinking it has something to do with Math.cos() or Math.sin()
Here is my current code(which doesn’t work):
r = mc._rotation;
mc._rotation = 0;
w = mc.clip._width;
h = mc.clip._height;
mc._rotation = r;
valT = Math.cos®*w
trace (“valT”+valT)
valR = Math.sin®*w
trace (“valR”+valR)
startDrag(mc, false, 0, 0, this._width-valR, this._width);
Does somebody know of a script somewhere which will fix this, PLEASE?