emedia
06-20-2005, 05:05 AM
Hi
I'm having a problem with this code.
It's get's its data from an asp page which is ouputting correctly.
The problem I am having is that the download_title is using the arrayed values correctly (i.e different text for each item), but the download_link2 is using the last value in the array for all of the items (attached movies).
Any ideas?
Thanks in advance
==
if (arrayManuals.length>0) {
//
containerRef.title1_txt._visible = true;
containerRef.title1_txt._y = placement_y;
placement_y += containerRef.title1_txt._height+spacer;
//
for (i=0; i<arrayManuals.length; i++) {
//
if ((arrayManuals[i].ManualInfo != "") & (arrayManuals[i].ManualURL != "")) {
//
var download_title = arrayManuals[i].ManualInfo;
var download_link2 = imagePath+arrayManuals[i].ManualURL;
//
item = containerRef.attachMovie("download_with_text", "item"+itemCounter, 10+itemCounter);
itemCounter++;
//
item._x = 10;
item._y = placement_y;
//
item.content_txt.htmlText = "<b>"+download_title+"</b>";
item.download_btn.onRelease = function() {
getURL(download_link2, "_blank");
};
//
placement_y += item._height+spacer;
}
}
} else {
//
containerRef.title1_txt._visible = false;
}
I'm having a problem with this code.
It's get's its data from an asp page which is ouputting correctly.
The problem I am having is that the download_title is using the arrayed values correctly (i.e different text for each item), but the download_link2 is using the last value in the array for all of the items (attached movies).
Any ideas?
Thanks in advance
==
if (arrayManuals.length>0) {
//
containerRef.title1_txt._visible = true;
containerRef.title1_txt._y = placement_y;
placement_y += containerRef.title1_txt._height+spacer;
//
for (i=0; i<arrayManuals.length; i++) {
//
if ((arrayManuals[i].ManualInfo != "") & (arrayManuals[i].ManualURL != "")) {
//
var download_title = arrayManuals[i].ManualInfo;
var download_link2 = imagePath+arrayManuals[i].ManualURL;
//
item = containerRef.attachMovie("download_with_text", "item"+itemCounter, 10+itemCounter);
itemCounter++;
//
item._x = 10;
item._y = placement_y;
//
item.content_txt.htmlText = "<b>"+download_title+"</b>";
item.download_btn.onRelease = function() {
getURL(download_link2, "_blank");
};
//
placement_y += item._height+spacer;
}
}
} else {
//
containerRef.title1_txt._visible = false;
}