-
Array storing an increasing variable .i
i want to make the elements for an array, each one i++........so
ArrayOne = Array()
ArrayOne[i] = i
i++
can somone make it work so the array would liik like....
ArrayOne = [0,1,2,3,4,5,6,7...]
chrz...
-
Senior Member
The code below will do what you want, but with the use of a recurring function by way of set Interval.
PHP Code:
var arr:Array = new Array(); var interval = setInterval(update, 1000); var i:Number = 0;
function update():Void { i++; arr.push(i); trace(arr); }
Wile E. Coyote - "Clear as mud?"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|