# \[as1\] problem parsing xml through flash var

**URL:** <https://forum.kirupa.com/t/as1-problem-parsing-xml-through-flash-var/284648>\
**Category:** flash\
**Created:** [March 21, 2009, 5:35pm UTC](https://forum.kirupa.com/t/as1-problem-parsing-xml-through-flash-var/284648 "2009-03-21T17:35:14Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdzines](https://avatars.discourse-cdn.com/v4/letter/k/7ea924/32.png) [@kdzines](https://forum.kirupa.com/u/kdzines)\
**Post date:** [March 21, 2009, 5:35pm UTC](https://forum.kirupa.com/t/as1-problem-parsing-xml-through-flash-var/284648/1 "2009-03-21T17:35:14Z")

</div>

Hi,

I am building a site whereby i want to pass the xml path for my content through a flash variable with swfobject. I can trace the variable in my flash movie but can’t get the xml to parse.

The xml AS is as follows:

```php
_global.menu_xml = new XML ();
menu_xml.ignoreWhite = true;
menu_xml.onLoad = function (ok)
{

	//
	// create main menu after successful loading of XML
	if (ok)
	{
	setState();
	} else
	{
		bad_text.text = xml_URL + " traced flashvar";
	}
};
//live xml
xml_URL = _root.xmlPath

menu_xml.load (xml_URL);

```

And the Swf object is this:

```php
<script type="text/javascript">
			var flashvars = {};
			flashvars.xmlPath = "http://www.domakaya.com/09/collections/xml/ss_05.xml";	
		      
			var params = {};
			var attributes = {};
			attributes.id = "flash";
			swfobject.embedSWF("http://domakaya.com/09/collections/collections.swf", "flash", "660", "504", "9.0.0", false, flashvars, params, attributes);
		
</script>

```

I am completely stuck ☹ I thought maybe it’s not recognising the variable as a string?

Tried everything i can think of, would really appreciate some help.

Thanks,  
Kam
