# Externally specifying the URL of a .xml document?

**URL:** <https://forum.kirupa.com/t/externally-specifying-the-url-of-a-xml-document/302609>\
**Category:** Uncategorized\
**Created:** [January 4, 2010, 9:45am UTC](https://forum.kirupa.com/t/externally-specifying-the-url-of-a-xml-document/302609 "2010-01-04T09:45:54Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![leeyoung](https://avatars.discourse-cdn.com/v4/letter/l/7feea3/32.png) [@leeyoung](https://forum.kirupa.com/u/leeyoung)\
**Post date:** [January 4, 2010, 9:45am UTC](https://forum.kirupa.com/t/externally-specifying-the-url-of-a-xml-document/302609/1 "2010-01-04T09:45:54Z")

</div>

Hey guys,

Pretty new to CS4 and could do with some help. I have a .FLA file which is loading images dynamically from a .xml file called “source.xml” using this code:

// url to slideshow xml  
var strXMLPath:String = “source.xml”;  
// slideshow xml loader  
var xmlLoader:URLLoader;  
// slideshow xml  
var xmlSlideshow:XML;

function init():void {  
// create new urlloader for xml file  
xmlLoader = new URLLoader();  
// add listener for complete event  
xmlLoader.addEventListener(Event.COMPLETE, onXMLLoadComplete);  
// load xml file  
xmlLoader.load(new URLRequest(strXMLPath));

It all works fine, but instead of specifying the URL for the .xml file within the .FLA file, I need to be able to specify it externally, preferably within the HTML doc the flash is used in. What is the best way to do this? FlashVars? Any help/advice would be great, thanks.

Lee.
