# Getting variable to an external SWF file on load

**URL:** <https://forum.kirupa.com/t/getting-variable-to-an-external-swf-file-on-load/73993>\
**Category:** flash\
**Created:** [December 22, 2004, 4:41pm UTC](https://forum.kirupa.com/t/getting-variable-to-an-external-swf-file-on-load/73993 "2004-12-22T16:41:17Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xMetal](https://avatars.discourse-cdn.com/v4/letter/x/c6cbf5/32.png) [@xMetal](https://forum.kirupa.com/u/xMetal)\
**Post date:** [December 22, 2004, 4:41pm UTC](https://forum.kirupa.com/t/getting-variable-to-an-external-swf-file-on-load/73993/1 "2004-12-22T16:41:17Z")

</div>

I’m having a bit of a conundrum.

I have an external SWF file that is a dynamic chart. It normally requires (in the object and embed tags on the HTML page) a variable passed to it that points to an XML file.

What I want to do, is create a “container” program that simply has a few buttons, that when clicked load up that same chart.swf and point it to a different XML file.

What I can’t figure out is how to get that external file to recognize it’s dataURL parameter that it normally receives off the html tags. (BTW, I can’t edit that chart.swf, it’s a purchased product.) I tried setting a root variable of the same name in my container to point to a new XML file, but that doesn’t work. I tried setting that variable, and using loadMovie with a GET to pass it the name, but that just looks for a string that flash seems to be interpreting literally, so it can’t locate the file at all (I.e. it’s looking for the literal name “chart.swf?dataURL=datafile.xml”)

Any ideas? I’m in no way a newbie at flash, but just don’t recall seeing a way to handle that easily.
