The problem is that I want the object to flip around as it goes around the radius (so that the user will see the reverse side of the square). I've tried using -Math.sin() on the _xscale but it's not perfect.
Please help a Math dropout. Thanks for your help.
someday i'll be a kick-ass flash developer - you'll see.
this will scale it so it flips around, so that when it is "furthest" away, you see the reverse of the mc. But i looks a bit "off" because it remains a rectangle always, but it would have some perspective really. See what i mean? At least it's a start though.
No idea how to do the perspective, other than what ericlin said about masks on the other recent thread on this board.
Oh, and that code could be optimised a bit. But i guess the standard practice is too concentrate on that when it's all working properly!
There are two effects. Your code accounts for the scaling down due to the object being farther away. The other effect, which works only on the x axis, is due to viewing the object (which I'm assuming is 2-dimensional) at an angle. You need to multiply _xscale ALSO by cos(angle).
There are other interesting issues here. You seem to have the viewer positioned pretty close to the path of the object. The code you've got (with the correction I've suggested) is really for a viewer very far away. You nearby observer will, for instance see the object move across the field of view faster from L to R than vice versa. And the angle between the object and the line of sight is not really "angle".
Try it anyway, you'll probably be happy with it. If you want to account for some subtleties, try something like this: (my f is your fl)