# No error displayed but doesn't work!

**URL:** <https://forum.kirupa.com/t/no-error-displayed-but-doesnt-work/213958>\
**Category:** Uncategorized\
**Created:** [January 24, 2007, 4:30pm UTC](https://forum.kirupa.com/t/no-error-displayed-but-doesnt-work/213958 "2007-01-24T16:30:30Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sofck](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@sofck](https://forum.kirupa.com/u/sofck)\
**Post date:** [January 24, 2007, 4:30pm UTC](https://forum.kirupa.com/t/no-error-displayed-but-doesnt-work/213958/1 "2007-01-24T16:30:30Z")

</div>

I hava some actionscript code.  
(Thanks kirupa team - it’s from xml mp3 player)  
What i wanted:  
Anywhere in movie i insert this code in a frame, make needed buttons and movies and then this code will generate list of buttons (from template) with names and link to my files, according to my xml file.  
All is very good:  
list of buttons generates, all file names are correct,  
according to command _trace();_ all links are created correct.  
And there no error displayed in flash 8.  
\*\*BUT WHEN I CLICK ANY BUTTON I ALWAYS GO TO THE LINK ENTERED  
IN LAST XML STRING.  
**_(according to xml shown below, it’s always file2.zip)_  
\*\*  
Here is the gode for a frame:**

```auto

XMLNode.prototype.moveBefore = function(beforeNode){
    if (this == beforeNode) return (0);
    beforeNode.parentNode.insertBefore
    (this.cloneNode(true),beforeNode);
    this.removeNode();
}

///////DOWNLOAD LINKS/////////
var down_spacing = 20;
GenerateFileListing = function(download_xml, target_mc){
target_mc = target_mc.createEmptyMovieClip("list_mc",1);
var files = download_xml.firstChild.childNodes;
for (var i=0; i<files.length; i++){
var get_mc = target_mc.attachMovie("get", "get"+i, i);
get_mc._y = i*down_spacing;
get_mc.node = files*;
get_mc.title_txt.text = files*.attributes.title;
var filename = files*.attributes.url;
get_mc.down_btn.onRelease = function () {
getURL("http://uneed.ru/download/"+ filename +"", "_blank");
}
////////SHOW IN PROGRAMM THE LINKS////
var showlinks = 'http://uneed.ru/download/'+ filename +''
trace (showlinks);
////////SHOW IN PROGRAMM THE LINKS///  
    }
}

var download_xml = new XML();
download_xml.ignoreWhite = true;
download_xml.onLoad = function(success){
 if (success){
 GenerateFileListing(this,download_mc);
    }else trace("Error loading XML file");
}

download_xml.load("download.xml");

```

\*\*Here is what xml file contains:  
\*\*

```auto

<?xml version="1.0" ?>
<playlist>
<song title="file1" url="file1.zip"></song>
<song title="file2" url="file2.zip"></song>
</playlist>

```

\*\*  
PLEASE ANYBODY HELP ME WITH THIS BUG(i think so).  
all my project stoped 5 day ago…:\*(

Here is the source codes:\*\*  
[http://www.uneed.ru/links.zip](http://www.uneed.ru/links.fla)
