# Hard-coded playlist XML url into Flashvar?

**URL:** <https://forum.kirupa.com/t/hard-coded-playlist-xml-url-into-flashvar/275853>\
**Category:** flash\
**Created:** [November 19, 2008, 1:44pm UTC](https://forum.kirupa.com/t/hard-coded-playlist-xml-url-into-flashvar/275853 "2008-11-19T13:44:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![joejubee](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@joejubee](https://forum.kirupa.com/u/joejubee)\
**Post date:** [November 19, 2008, 1:44pm UTC](https://forum.kirupa.com/t/hard-coded-playlist-xml-url-into-flashvar/275853/1 "2008-11-19T13:44:46Z")

</div>

Hey All,

So right now, I have a video player that pulls in all sorts of info (flv url, caption file url, video title, description, preview image, etc.) through an external xml file (playlist.xml). It works great, but I need to change the coding so it’s not hard-coded into the FLA, rather from the embed code for the swf.

Any idea how I can do this?

Here’s the chunk of AS3 code that’s involved in the original loading of the XML data:

```auto
[LEFT]var Loadedxml:XML;

var urlLoader:URLLoader = new URLLoader();
var urlRequest = new URLRequest("playlist.xml");
urlLoader.load(urlRequest);
urlLoader.addEventListener(Event.COMPLETE, onComplete)

function onComplete (evt:Event):void
{
try
{
var Loadedxml:XML= new XML(evt.target.data);
processXML (Loadedxml);
}
catch (evt:TypeError)
{
trace ("Could not parse text into XML");
trace (evt.message);
}
}[/LEFT]

```

And here’s the code on the html page:

```auto

<noscript>
	<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="500" height="415" id="AS3_Player_XML_1119" align="middle">
	<param name="allowScriptAccess" value="sameDomain" />
	<param name="allowFullScreen" value="true" />
	<param name="movie" value="AS3_Player_XML_1119.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#ecf2fe" />	<embed src="AS3_Player_XML_1119.swf" quality="high" bgcolor="#ecf2fe" width="500" height="415" name="AS3_Player_XML_1119" align="middle" allowScriptAccess="sameDomain" allowFullScreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
	</object>
</noscript>

```

Thanks!

Joe
