Created
June 23, 2011 19:02
-
-
Save davidnunez/1043316 to your computer and use it in GitHub Desktop.
Optimized Eyeball Clock Array init
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// initializes your array | |
$newcolori = array(); | |
// - for loop will repeat everything inside the '{...}' a certain number of times | |
// - i starts at 0 ('i=0') | |
// - i increases by 1 every time the loop repeats 'i++' | |
// - the for loop will repeat as long as i is less than or equal to 60 (starts at 0 goes up to 59) 'i<=60' | |
for (i=0;i<=60;i++) | |
{ | |
// - i is just like any other variable here... it just changes on every loop | |
// - you can create strings by combining a string and a variable "msgray"+i | |
$newcolori[i] = new Oval(200, "msgray"+i, 45,45,345,345); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This gist was for my friend emily to show her how to do for loops.