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 (x = 0; x < 64; x++)
worldArray[x] = new Array(64);
for (x = 0; x < 64; x++)
for (y = 0; y < 64; y++)
worldArray[x][y] = new Array(64);
for (x = 0; x < 64; x++)
for (y = 0; y < 64; y++)
for (z = 0; z < 64; z++){
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