my code is as follows:
var yearMarkersVar = new LoadVars()
yearMarkersVar.load("script/timeline.php");
yearMarkersVar.onLoad = loadYearVariables;
function loadYearVariables(){
trace(this.numberOfYears);
yearPosition = 20;
for (i = 1; i < this.numberOfYears; i++) {
yearOf = this["yearToPrint"+i];
yearMarker = "yearMarker"+i;
yearLink = "<a href=\"index.php?activeYear=" + yearOf + "\">" + yearOf + "</a>";
_root.attachMovie("yearMarkerClip", yearMarker, i, {_x:yearPosition, _y:5, yearText:yearLink});
yearPosition = yearPosition+100;
}
}
This reads a php file (which in turn reads a database) and returns a series of years that have content hidden behind them. then the years are placed into a dynamic textbox within a movieclip (yearmarker = “yearmarker”+i).
This all works fine. My trouble is i can’t figure out how to add an OnRollOver event to each dynamically added clip telling it to go to its second frame.
any suggestions?
Thanks in advance.