Intermittent/staggered loading of an object

Posted by cammy on Stack Overflow See other posts from Stack Overflow or by cammy
Published on 2010-06-14T13:14:47Z Indexed on 2010/06/14 13:52 UTC
Read the original article Hit count: 203

Hi guys, I've just recently tried my hand at actionscript 3 and have come across a road block. How do I go about rendering the cubes (cube1) intermittently, ie. staggered loading. I need the cubes to load a split second from each other.

Below is a snippet of what I have so far:

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); 
}

© Stack Overflow or respective owner

Related posts about actionscript-3

Related posts about papervision3d