Hello I got goal to achieve, 3d cube manipulated with mouse with gradient filling on each wall.
I found some source codes coresponding to gradients and 3d rotating cube but here is the problem:
When i put these two things together the effect looks like the cube was a wireframe with transparency to some gradient background hidden behind the first plane solid black background. Gradient always stays still.
Method which rotates/displays cube got at input three parameters rotx .roty, rotz i'd like to make use of it and apply it to gradients displayed on each side. gradient got own matrix but i don't have a clue how and when manipulate this gradient to get desired effect - i mean transform/rotate gradient in way ro look like it is painted on side of cube and tranform along to it 3d position. I guess that each side should have separate gradient matrix dor each side but what to do to transform this matrix to fit along with rotx,roty, i rotz. Can anyone help me?
here is source for gradient http://snipplr.com/view.php?codeview&id=7050
and site where you can get cube fla file http://www.flashandmath.com/flashcs4/cs4simple3d/index.html
and here is code of .fla file from link above with my modifications