[SOLVED] 3D Array shrinkes everything in my View

Software: Away3D 4.x

Babylon, Jr. Member
Posted: 30 September 2012 10:16 PM   Total Posts: 39

Greetings,
I am for certain that the function that creates me a 3D array causes everything on my screen to shrink…

private function createArray():void{
   
for (064x++)
    
worldArray[x] = new Array(64);
   
   for (
064x++)
    for (
064y++)
     
worldArray[x][y] = new Array(64);
 
   for (
064x++)
    for (
064y++)
     for (
064z++){
      worldArray[x][y][z] 
0;
    
     
}
   
   
   
  } 

If I change 64 to 128, the shrinkage is more intense.

You may view the example here:
http://bscacad2.buffalostate.edu/~klingeta01/wp/flash/bin-releaseNEWEST/physicsTest2.html

When you click the start game button, it will run the function CreateArray, and nothing more.

Any ideas?

EDIT:
So it isn’t the array creating, it’s the for loop. Whenever I put a forloop anywhere in my code my view freaks out….

EDIT EDIT:
So I forgot to initialize the X, Y, Z variables. I feel stupid. Anyway, that’s a pretty weird side effect.  So it works now…

Thanks,
Tim Klinger

   
   
‹‹ File extraction issues

X

Away3D Forum

Member Login

Username

Password

Remember_me



X