I am making my own scripted camera.

The idea behind a scripted camera is that you just move it anywhere you want on the screen, and, once the movie is compiled, a script in it makes that part of the movie visible. The idea comes from this web page.

I've already gotten it to be able to go left, right, up, down, and resize. However, I also want it to be able to rotate, which is something that even the guy who invented it can't figure out. Unfortunately, that requires trigonometry, and I can't get it to work in Flash.

Once horizontal and vertical movements, and resizing, have been taken care of, I think all the math that's left is this:

If I've got it right (I might not), and that's how to solve it, I myself could do it with a pencil and paper, but I can't seem to get Flash to do the trig correctly, at least not with all four quadrants with the same code.

The FLA file with my code in it is HERE.

I feel like I'm so close to figuring it out. I know ActionScript, and I know Trig, just... not both at the same time.