PDA

View Full Version : why doesn't this work in FMX2004



cookie
March 15th, 2004, 12:35 PM
for (x = 0; x < 10; x++){
for (y = 0; y < 10; y++){
this.createTextField("_txt"+depth, depth, x*20, y*20, 20, 20);
this_txt = this["_txt"+depth++];
this_txt.border = true;
this_txt.text = x+":"+y;
}
}

the above script is from senocular's isometry tutorial, but when i place it on the first frame in MX04 and test the movie -> the result is one box with text "9:9"

Please help!

nunomira
March 15th, 2004, 06:07 PM
hi,

that script doesn't work when you publish it for flashplayer7 because the variable depth doesn't exist.
you have to define it first:


var depth:Number = 0;
// rest of code goes here

cookie
March 15th, 2004, 06:08 PM
Thanks nunomira!! :)