Search tutorials
Ill explain what this code means, because without understanding it youre really not much better off.
The first line gets the distance between the movie clip on the stage and the mouse position, both x and y, and then calculates the angle of the imaginary line between the movie clip registration point and the mouse position (this details in other tutorials on here as well, so check on them if youre not sure about this) This will be useful in making the movie clip rotate.
The problem with this first line is that it converts the angle into radians, an alternative form of angle measurement to degrees. We need to convert it into degrees if were going to be able to make the movie clip rotate. Thats what the second line of code does.
The next part measures the distance between a) the movie clip registration point and the x position of the mouse, and b) the movie clip registration point and the y position of the mouse, telling us how far away the mouse is from the movie clip.
The first line gets the distance between the movie clip on the stage and the mouse position, both x and y, and then calculates the angle of the imaginary line between the movie clip registration point and the mouse position (this details in other tutorials on here as well, so check on them if youre not sure about this) This will be useful in making the movie clip rotate.
The problem with this first line is that it converts the angle into radians, an alternative form of angle measurement to degrees. We need to convert it into degrees if were going to be able to make the movie clip rotate. Thats what the second line of code does.
The next part measures the distance between a) the movie clip registration point and the x position of the mouse, and b) the movie clip registration point and the y position of the mouse, telling us how far away the mouse is from the movie clip.
| » Level Advanced |
|
Added: 2003-12-04 Rating: 8 Votes: 88 |
| » Author |
| Multimedia designer and Flash groupie. |
| » Download |
| Download the files used in this tutorial. |
| Download (10 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!