I am really confused trying to understand the basics of how 3d works in Flash and ActionScript.
I think by explaining how I could do the following that might make things a bit clearer.
I have created a green rectangle in a MovieClip and assign it a class. I then create several instances of this class on the stage. If I put them in a line across the screen and set the rotationY
property to 90 on all of them they all look different. They look like they would if you were looking at them through a camera.
This is the actionscript code:
package {
import flash.display.MovieClip;
import flash.events.Event;
public class Main extends MovieClip {
public function Main() {
for (var i:uint=0; i<21; i++)
{
var obj = new Test();
obj.y = 300;
obj.x = i * 80;
obj.rotationY = 90;
addChild(obj);
}
}
}
}
This is a screenshot of the output:
This is a screenshot of the MovieClip:
How would I go about arranging these on the screen so that they all appeared side on (like one bang in the centre would)? I effectively want to disable looking at it through a camera.
Likewise does this mean that even objects that are on the stage that have a y rotation of 0 are also being treated like they are in a 3d space and rotated slightly?
Thanks!