Scripting 3D in Flash - questions

Hi,

I’m sure I’m going to have a bunch of questions as I progress through the tutorial, but I was hoping someone could explain this:
http://www.kirupa.com/developer/actionscript/more_panning.htm

At the bottom of the page, sen writes this:[INDENT]Finally the function to make it all happen. This will base camera movement off of the arrow keys and use

[FONT=Courier New, Courier, mono]clip.[COLOR=#000080]_x[/COLOR] += [COLOR=#000080]Math[/COLOR].[COLOR=#000080]cos/COLOR*radius;
clip.[COLOR=#000080]_y[/COLOR] += [COLOR=#000080] Math[/COLOR].[COLOR=#000080]sin/COLOR*radius;[/FONT]
[/INDENT]However in his code he writes this:[INDENT]cameraView.x += Math.sin(cameraView.rotation)*movement;
cameraView.z += Math.cos(cameraView.rotation)*movement;
[/INDENT]what happens is he switches the sin and cos methods from what he said. However, for displaying all the “figures” those far and including this example, cos was used for “x” and sin was used for “y” like so:
[INDENT]var x = Math.cos(angle)*this.radius;
var z = Math.sin(angle)*this.radius;
[/INDENT]So I don’t understand why the difference between the camera and the figures and when to use cos or sin. Did I missing something in the tutorial or did sen (in his vast and infinite wisdom) just overlook that little point which is causing me a lot of confusion.

Help!
Cheers
:slight_smile: