Hi everyone,
I got the following code for a rotating 3d cube. I’m trying to reduce its size…it should be simple. I’ve done it before by changing the Z axis but no idea how to proceed here…Any ideas?
[SIZE=1]import com.theflashblog.fp10.SimpleZSorter;
import com.theflashblog.fp10.SimpleZSortVO;
import flash.display.DisplayObject;
import flash.geom.Point
con.getChildAt(0).rotationY = 90;
con.getChildAt(0).x = -140;
con.getChildAt(1).rotationY = 90;
con.getChildAt(1).x = 140;
con.getChildAt(2).z = 140;
con.getChildAt(3).rotationX = 90;
con.getChildAt(3).y = 140;
con.getChildAt(4).rotationX = 90;
con.getChildAt(4).y = -140;
con.getChildAt(5).z = -140;
addEventListener(Event.ENTER_FRAME, loop);
function loop(e:Event):void {
SimpleZSorter.sortClips(con);
con.rotationY -= (mouseX - stage.stageWidth / 2) * 0.01;
con.rotationX += (mouseY - stage.stageHeight / 2) * 0.01;
}
/*stage.addEventListener(MouseEvent.MOUSE_MOVE, onMove);
function onMove (e:MouseEvent):void {
var target:Vector3D = new Vector3D(mouseX,mouseY,0);
var at:Vector3D = new Vector3D(0,0,-1);
var up:Vector3D = new Vector3D(0,-1,0);
con.z = 140;
con.transform.matrix3D.pointAt(target, at, up);
e.updateAfterEvent();
}*/
[SIZE=2]THANKS A LOT!!![/SIZE]
[/SIZE]