Search tutorials
var dy = _ymouse-arrow._y;
var dx = _xmouse-arrow._x;
this takes y/x values and substracts them to make the legs of a triangle.
var radians = Math.atan2(dy, dx); Arctanget is the opposite of tangent which is triganometry if you dont know it is not a big deal right now. buy it takes the ratio of the values and divides them i believe(not 100% sure) you can also use var radians = Math.atan(dy / dx); and it would be the same. but that make a radian value.
| » Level Intermediate |
|
Added: 2008-05-05 Rating: 7.61 Votes: 23 |
| » Author |
| Started actionscript not even a year ago buy spend my spair time learning it. |
| » Download |
| Download the files used in this tutorial. |
| Download (5 kb) |
| » Forums |
| More help? Search our boards for quick answers! |
-
You must have javascript enabled in order to post comments.


Comments
There are no comments yet. Be the first to comment!