I have file that pulls data from mysql with php into a dynamically created text field. Everything works great, the data is getting place properly... the buttons are active but I want the color of text the to change on roll over and that is where I am getting stuck.... any ideas?
System.useCodepage = true;
myData = new LoadVars();
myData.load("heights.php?"+Math.random());
myData.ref = this;
myData.onLoad = function(success) {
if (success) {
for (var i = 0; i<this.count; i++) {
this.ref.clip = createEmptyMovieClip("clik", 100);
this.ref.clip.createTextField(["color1"+i], 3, 300, 300, 100, 20);
this.ref.clip["color1"+i].selectable = false;
this.ref.clip["color1"+i].textColor = 0x000000;
this.ref.clip["color1"+i].text = this["color"+i];
this.ref.clip.onRelease = function() {
trace("click");
};
this.ref.clip.onRollOver = function() {
trace(clip.color1);
this.ref.clip["color1"+i].textColor = 0x000000;
};
this.ref.clip.onRollOut = function() {
this.ref.clip.color1.textColor = 0xff0000;
};
// load title text
// load color 1 text
}
} else {
trace("Error loading data");
}
};
Thanks in advanced.