# 3D cube change size - should be simple?

**URL:** https://forum.kirupa.com/t/3d-cube-change-size-should-be-simple/310233
**Category:** flash
**Created:** [June 4, 2010, 9:58pm UTC](https://forum.kirupa.com/t/3d-cube-change-size-should-be-simple/310233 "2010-06-04T21:58:33Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![jspark11](https://avatars.discourse-cdn.com/v4/letter/j/73ab20/32.png) [@jspark11](https://forum.kirupa.com/u/jspark11)
#### Post date: [June 4, 2010, 9:58pm UTC](https://forum.kirupa.com/t/3d-cube-change-size-should-be-simple/310233/1 "2010-06-04T21:58:33Z")

</div>

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]
