# Loading up links dynamicaly in buttons

**URL:** <https://forum.kirupa.com/t/loading-up-links-dynamicaly-in-buttons/171853>\
**Category:** flash\
**Created:** [December 8, 2005, 6:58pm UTC](https://forum.kirupa.com/t/loading-up-links-dynamicaly-in-buttons/171853 "2005-12-08T18:58:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mabans](https://avatars.discourse-cdn.com/v4/letter/m/838e76/32.png) [@Mabans](https://forum.kirupa.com/u/Mabans)\
**Post date:** [December 8, 2005, 6:58pm UTC](https://forum.kirupa.com/t/loading-up-links-dynamicaly-in-buttons/171853/1 "2005-12-08T18:58:09Z")

</div>

I am using a external text file to lead in a link into a flash file. I understand I could have the a text area to render the “\<a ref…” code to HTML but I’m using a button to crate a nice roll over so I would ideally like to have it go off of the button.

What I’m using to bring up a link location is like this.

```auto
//create new instance of LoadVars object
myData = new LoadVars();

//define what to do with content once it has loaded
myData.onLoad = function()
{
	//the value of the "content" property is assigned to the text field
	**link1.text** = this.link1;
};

//now load the external file into the myData object
myData.load("filename.txt");

stop();

```

After I create a button I include in the action this

```auto
on (release) {
	getURL(" **link1.text**", "_self");
}

```

As expected it doesnt work. Any ideas?
