Access of possibly undefined property number through a reference with static type...
Hello everyone !
I run into this problem today ... take a look on the code :
import com.trick7.effects.TeraFire;
for (var j:uint=0; j<10; j++) {
var fire:TeraFire = new TeraFire();
fire.x = j * 40 + 20;
fire.y = 100;
fire.number = j; //This line is causeing the problem
addChild(fire);
fire.buttonMode = true;
}
TeraFire class creates fire particles. The compiler error is :
Scene 1, Layer 'Layer 1', Frame 1, Line 7 1119: Access of possibly undefined property number through a reference with static type com.trick7.effects:TeraFire.
Anyone can help me to find a solution to this problem.
I can do that ".number" with a movieclip but not in this case. What can I do ?
