# Actionscript/xml problem

**URL:** <https://forum.kirupa.com/t/actionscript-xml-problem/32292>\
**Category:** Uncategorized\
**Created:** [October 4, 2003, 12:10pm UTC](https://forum.kirupa.com/t/actionscript-xml-problem/32292 "2003-10-04T12:10:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![x\_vector](https://avatars.discourse-cdn.com/v4/letter/x/b9e5f3/32.png) [@x\_vector](https://forum.kirupa.com/u/x_vector)\
**Post date:** [October 4, 2003, 12:10pm UTC](https://forum.kirupa.com/t/actionscript-xml-problem/32292/1 "2003-10-04T12:10:59Z")

</div>

hej peeps …

after reading the tuts here on kirupa and [as.org](http://as.org) i started  
fiddling around myself with this xml-shiznit …

i used LostinBeta’s/Senocular’s xmlmenu.zip as reference …

i created 3 buttons that will link to 3 different sites  
the buttons get their info from xml file …

when i run my file the buttons appear, each with the  
correct \<ITEM NAME/\> only they all link to the same site …  
(the last “\<ITEM URL/\>” entry in the xml file)

how come … ??

i doubledouble checked the whole thingie ,searched the forums,  
read the tuts again … but i can’t figure out why they all link to the same site …

here’s my xml :

```php
<?xml version="1.0"?>
<LINKS>
	<ITEM NAME="check this site" URL="http://www.google.nl/" TARGET="_blank" />
	<ITEM NAME="kirupa.com" URL="http://www.kirupa.com/" TARGET="_blank" />
	<ITEM NAME="actionscript.org" URL="http://www.actionscript.org/" TARGET="_blank" />
</LINKS>

```

and here’s the actionscript i use

```auto
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function (success) {
	myITEM = this.firstChild.childNodes;
	if (success) {
		for (i=0; i<myITEM.length; i++) {
			myATTRIBUTES = myITEM*.attributes;
			myButton = _root.attachMovie("textClip", "textClip"+i, i);
			myButton._x = myButton._y = 100;
			myButton._y += 40*i;
			myButton.buttonLabel.autoSize = true;
			myButton.buttonLabel.text = myATTRIBUTES.NAME;
			myURL = myATTRIBUTES.URL;
			myTARGET = myATTRIBUTES.TARGET;
			myButton.onRelease = function () {
				getURL(myURL, myTARGET);
			}
		}
	}
}
myXML.load("links.xml");

```
