Search tutorials
The Logic
Before you can even know the logic, you must understand a few points:
- Flash 5 has practically no capability to do anything in 3d space.
- Flash cannot also draw any lines or objects at runtime.
- Complex 3d objects can cause it to become a nightmare in slow machines(like mine, a PII 350).
Now that you have understood these facts, you can go and design a logic:
- You need to first specify the number of vertices an object is made up of, what points are connected and where they are located in 3 dimensional space.
- You need to then rotate the object virtually, i.e., you must rotate an object that does not even exist. You can do this using trignometrical formulae(No, they are the easiest part of the apple).
- Since Flash does not draw 3d, you must convert the 3D Points (with 3 co-ordinates x,y,z) to 2D Points(with 2 co-ordinates x & y). You can do this too by using simple formulae.(Now don't think that life's easy)
- Then you must draw lines or circles connecting the 2D vertices got from the previous step. You can do this by using a small movieclip with a 45 degree line and then duplicating it and positioning it.
- Then you must rotate this object every time the mouse moves.
We will do all the above one by one in the following steps.
| » Level Advanced |
|
Added: 2002-07-05 Rating: 9 Votes: 1235 |
| » Author |
| Age: 14 Profession: High School Student Location: Chennai, India(Not Indiana). Just doing it for fun. Ready to do small Freelance jobs. |
| » Download |
| Download the files used in this tutorial. |
| Download (51 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!