# Loading URL onto a button in swf that is loaded through Loader component with XML

**URL:** <https://forum.kirupa.com/t/loading-url-onto-a-button-in-swf-that-is-loaded-through-loader-component-with-xml/221982>\
**Category:** flash\
**Created:** [April 9, 2007, 9:42pm UTC](https://forum.kirupa.com/t/loading-url-onto-a-button-in-swf-that-is-loaded-through-loader-component-with-xml/221982 "2007-04-09T21:42:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpnm](https://avatars.discourse-cdn.com/v4/letter/j/c37758/32.png) [@jpnm](https://forum.kirupa.com/u/jpnm)\
**Post date:** [April 9, 2007, 9:42pm UTC](https://forum.kirupa.com/t/loading-url-onto-a-button-in-swf-that-is-loaded-through-loader-component-with-xml/221982/1 "2007-04-09T21:42:12Z")

</div>

I’m using an instance of the XMLConnector component to load a dynamically generated XML file which contains data to open an swf into a instance of the Loader component on the stage. The Loader component has been binded to the XMLConnector and the swf loads fine but I need to be able have a URL generated dynamically for a Flash button (in the swf that is loaded) using the XML file. This URL needs to be a relative link to a PDF on the server. The reason it needs to be a Flash button is because there are graphics used for the button (more than a text field).

The XML file looks similar to this:

\<data\>  
\<button\>button.swf\</button\>  
\</data\>

In the swf that is loaded I have created an invisible button above my graphic (which may or may not be needed as I’m sure there is a way of dynamically generating a button and a URL). On the button I’m hoping to have something similar to this generated where “content.pdf” is the URL to the PDF from the XML file:

on (release) {  
getURL(“content.pdf”, “\_blank”);  
}

Any suggestions would be appreciated.

Thanks!
