开发者

How to get 3D effect in flash?

开发者 https://www.devze.com 2023-01-24 20:14 出处:网络
I have intermediate knowledge of flash and actionscript, but I have never done 3D animations in flash. Now I\'m into a project that requires me to make a menu that looks like a DNA molecule, with each

I have intermediate knowledge of flash and actionscript, but I have never done 3D animations in flash. Now I'm into a project that requires me to make a menu that looks like a DNA molecule, with each atom being a link to something. I want to make the DNA molecule looks like a real rotating 3D object. Can anyone help me out how can I implement this? Can the开发者_运维百科re be any hack (like using videos of rotating DNA molecule, etc) ???


There are a few popular libraries which could help you make this. For example, Away3D, Alternativa, and Papervision3D. At the moment it seems like the first two are being kept up to date more than the last one.

Have a look at this Away3D tutorial. It walks through creating a planet and a sun. Maybe it could be a starting point, something you could convert into a collection of atoms.

http://www.flashmagazine.com/tutorials/detail/create_the_earth_and_heavens_in_less_than_an_hour_with_away3d/


You could do this with one of the mentioned 3D libraries but I think it would be overkill if your graphics are just sphere-like elements swirling around together. There is a good book called "Actionscript 3.0 Animation" that covers a lot of what you are looking for.

Basically you will want to write a script that moves your objects around a center point and then use a function to z-sort the objects so they are stacked in the proper order to give the 3D appearance. You can set their brightness based on their z-position to make the items in the back darker, and items in the front brighter. I think this is a lot simpler then trying to set it up in true 3D with the added CPU cost of rendering the 3D engine just for your navigation.

link to book on publisher's site

0

精彩评论

暂无评论...
验证码 换一张
取 消