I have this simple code:
...
for (var w:Number=0; w < MAX_w; w++){
for (var k:Number=0; k < MAX_k; k++){
trace("test01");
if(w != k){
trace("test02");
///do sth...
}
}
}
...
And output is:
...
test01
TypeError: Error #1010: A term is undefined and has no properties.
at NS_fla::MainTimeline/vzdalenosti_bodu()
at NS_fla::MainTimeline/hlaska_zmacknul_sem()
...
Please suspects anybody what cause this problem?
Thx for answer.
If it only traces “test01” once, then the problem would not be from whatever is in the if(w!=k) scope, because the first time w=k=0. If your MAX_w and MAX_k are 0 then the problem would be coming from after the loop. In any case, the problem is not with w or k, and I think more code is needed in order to solve this issue.
BTW: Why Number and not int?