One way is by applying a transform matrix, as described (in, sorry, ugly
AS 1 code) here: http://flash-creations.com/notes/astb_outline3d.php
From the notes on that page
"start by defining the transform matrix (here defined as a property of
the Math object) to be an identity matrix (an array of 3 vectors which
when used as a multiplier with another matrix leaves the original matrix
intact). That is what the initTMatrix method of the Math class does.
Every time we want to redraw our 3D vectors in 2D space (once per frame
in this example), we call the redraw function, which sets the transform
matrix based on the amount of rotation in each direction (x/y/z)
specified by the rotation buttons, and then calls the renderScene method
of the wireFrame object. setTMatrix (a Math method) calculates a new
transform matrix by multiplying the current transform matrix by a new
matrix, determined by xvar/yvar/zvar and a variable I've called spinRate
(set to 200 here). renderScene (a method of wireFrame) applies the new
transform matrix to each point in each of the shapes to enable its
display in 2D space."
If you download the as file, you can look at Math.setTMatrix and the
other matrix methods to get some idea. But there are probably cleaner
AS 2 examples if you google for Flash transform matrix or some such.
Helen
Gustavo Duenas wrote:
Hi Guys, does anyone knows the way to move a 2d object(vector based)
in 3d, rotating axis x y and z, using action script course ....
I don't know probably is a dumb question...I'm using flash 8,
actionscript 2...and by the way do you know also how can I have
actionscript 3 in my
flash 8?
Regards
Gustavo Duenas
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com