1
我剛剛在actionscript 3上試過我的手,並遇到了路障。 我該如何間歇地渲染立方體(cube1),即。交錯加載。我需要立方體彼此分開加載。對象間歇/交錯加載
下面是我到目前爲止的代碼段:
var rows:int = 5;
var cols:int = 3;
var spacery:int = 100;
var spacerx:int = 120;
var box_count:int = 8;
for(var i:int; i < box_count; i++) {
cube1 = new Cube(ml,100,10,80,1,1,1);
cube1.y = ((i % rows)) * (cube1.x + spacery);
cube1.x = Math.floor(i/rows) * (cube1.x +spacerx);
cube1.z = 0;
bigBox.addChild(cube1);
}
你嘗試過一個計時器? – phwd 2010-06-14 13:27:59