Thread in rendering cubes

Software: Away3D 4.x

Rayen123, Member
Posted: 12 December 2011 07:36 PM   Total Posts: 70

Hi. I tryed creating cubes to scene (following code), but flash freeze on few seconds. I know that flash dont have thread, but how I can do it, that cubes will be displayed (continuosly) without freeze flash ? Thanks


viewport.scene.addChild(worldContainer);

funtion addToScene()_void{
var meshCube:Mesh;
meshCube = new Cube(SomeMaterial,16,16,1,1);

for (i=0; i

   

Hector, Sr. Member
Posted: 12 December 2011 07:48 PM   Total Posts: 137   [ # 1 ]

You have to take care with long nested ‘for’. Even if you increase the script timeout delay, it seems you have a lot of loops for flash and the user won’t see anything on screen for a while, until the last ‘for’ is run.
Maybe group them in smaller groups or use a timer? or both?

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X