# Array/getURL help

**URL:** <https://forum.kirupa.com/t/array-geturl-help/198399>\
**Category:** flash\
**Created:** [August 24, 2006, 6:43pm UTC](https://forum.kirupa.com/t/array-geturl-help/198399 "2006-08-24T18:43:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![soupee](https://avatars.discourse-cdn.com/v4/letter/s/e79b87/32.png) [@soupee](https://forum.kirupa.com/u/soupee)\
**Post date:** [August 24, 2006, 6:43pm UTC](https://forum.kirupa.com/t/array-geturl-help/198399/1 "2006-08-24T18:43:35Z")

</div>

I am creating an automated schedule. I can’t seem to assign the correct showurl to the onRelease function. It shows up as undefined. And if i put it as a variable, it only remembers the last url in the array.

Basically, i have it generating and naming 6-7 movieclips depending on the xml file and i want to assign their respective URL when a user clicks thru.

Can someone help me, please?

//-----------------------  
function loadXML(loaded) {  
if (loaded) {  
xmlNode = this.firstChild;  
showdate = [];  
showtime = [];  
showlength = [];  
showtitle = [];  
showurl = [];  
episodetitle = [];  
episodeurl = [];  
total = xmlNode.childNodes.length;  
for (i=0; i\<total; i++) {  
showdate\* = xmlNode.childNodes\*.childNodes[0].firstChild.nodeValue;  
showtime\* = xmlNode.childNodes\*.childNodes[1].firstChild.nodeValue;  
showlength\* = xmlNode.childNodes\*.childNodes[2].firstChild.nodeValue;  
showtitle\* = xmlNode.childNodes\*.childNodes[3].firstChild.nodeValue;  
showurl\* = xmlNode.childNodes\*.childNodes[4].firstChild.nodeValue;  
episodetitle\* = xmlNode.childNodes\*.childNodes[5].firstChild.nodeValue;  
episodeurl\* = xmlNode.childNodes\*.childNodes[6].firstChild.nodeValue;  
}  
mainSchedule();  
} else {  
content = “file not loaded!”;  
}  
}

xmlData = new XML();  
xmlData.ignoreWhite = true;  
xmlData.onLoad = loadXML;  
xmlData.load(“schedule.xml”);

function mainSchedule() {  
if (loaded == filesize) {  
for (var i=0; i\<total; i++) {  
\_root[“show” + i].mc\_time.text = showtime\*;  
\_root[“show” + i].mc\_show.text = showtitle\*;  
\_root[“show” + i].mc\_episode.text = “Episode:”;  
\_root[“show” + i].mc\_episodename.text = episodetitle\*;  
\_root[“show” + i].mcClick1.onRelease = function() {  
getURL(episodetitle\*);  
}  
}

```
}

```

}  
stop;
