I'm trying to create a timeline, where each circular node on a line represents a year.
Using a "startyear" and "endyear" variable, I can adapt the timeline to whatever range of years I need.
What I'm trying to do, though, is make it so each node will change color when it is rolled over.
What I have right now, is that the node directly to the right of the node I've rolled over changes color! So clearly, there's some kind of incrementing issue...
I'm pasting the code below - I hope someone can help!
Thanks,
V
//global variables
int distFromEdge = 100; //distance from the edge of the window
int startYear = 1997; //first year
int endYear = 2012; //last year
int currentYear = startYear; //current year in the loop; start at startyear
int yearSpacing = (endYear-startYear); //how many spaces are there?
int circleSize = 30; //node diameter
float x = distFromEdge; // X-Position of node for the loop
int circleY = height/2; // Y-Position of nodes always - must be along the line
float[] circleX = new float[yearSpacing+1]; //an array of each nodes x position
int indexYear = 0; //this will be the index for circleX[] above