Hello,
I’ve been trying to set this up for a couple days. When functioning properly, this file should update the displayed information according to the date. The raw data is imported from an XML file.
Some days will have links and some days won’t, on the days that have links I want actionscript to make buttons for the links. So far I can create the buttons, but all the links and buttons are the same as the last link in the list.
The basic code follows:
if (links* != 0) {
for (k=0; k<linksLength; k++) {
var link_mc = date_mc.duplicateMovieClip("link_mc"+k, this.getNextHighestDepth());
link_mc._x = 410;
link_mc._y = newY+=15;
link_mc.beginFill(0xFF00FF, 100);
link_mc.lineStyle(1, 0x000000);
link_mc.lineTo(0,0);
link_mc.lineTo(200, 0);
link_mc.lineTo(200, 20);
link_mc.lineTo(0, 20);
link_mc.lineTo(0,0);
link_mc.endFill();
link_mc._alpha = 10;
this.createTextFields(0,0,"link_txt"+k,300);
var newLink = ["link_txt"+k];
newLink.htmlText.html = true;
newLink.htmlText.border = true;
newLink.htmlText = links*[k];
newLink.htmlText._y = newY+=10;
newLink.htmlText._x = 0;
var newText = links*[k];
newLink._y = link_mc._y;
link_txt0._x = link_mc0._x;
link_txt0.htmlText = newText;
link_txt1._y = 275;
link_txt1.htmlText = newText;
newLink.htmlText = links*[k];
trace(link_mc);
trace(newText);
link_mc.onRelease = function () {
getURL(newText);
trace(link_mc);
trace(newText);
}
I attached the fla and xml file.