Hi;
The following script fully increments the value of i every time it calls
_addNewFlame. I would have thought (and need) that the value of i would be
incremented with each call. Please advise.
TIA,
John
package
{
import flash.display.MovieClip;
import flash.utils.setInterval;
import flash.utils.clearInterval;
import fireBall;
public class Fire extends MovieClip
{
private var mcFlameContainer:MovieClip;
private var uintMakeAFlame:uint;
private var i:Number = new Number(0);
public function Fire()
{
mcFlameContainer = new MovieClip();
addChild(mcFlameContainer);
for (i; i < 10; i++)
{
uintMakeAFlame = setInterval(_addNewFlame, 15);
}
}
private function _addNewFlame():void
{
var flameNew:fireBall = new fireBall();
mcFlameContainer.addChild(flameNew);
flameNew.y = 200;
flameNew.x = 20 + (i * 10);
}
}
}
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders