Hi there,
I am wondering what the trick is to count by two’s. So I have a loop, currently going from 0 to 400 (my stage height), but instead of looping 1,2,3,4,5,6… i want it to just do every second one 1,3,5,7,9…
any ideas? thanks in advance
heres a portion of my code:
public function populate():void {
for (var i = 0; i < h; i++) {
var theY:int = i;
line.graphics.lineStyle(1, Math.random()*0xFFFFFF, Math.random());
line.graphics.moveTo(0, theY);
line.graphics.lineTo(w, theY);
addChild(line);
}
}