# Adding a link to a button from a text file?

**URL:** https://forum.kirupa.com/t/adding-a-link-to-a-button-from-a-text-file/193140
**Category:** flash
**Created:** [July 4, 2006, 6:20pm UTC](https://forum.kirupa.com/t/adding-a-link-to-a-button-from-a-text-file/193140 "2006-07-04T18:20:02Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![thegaffer](https://avatars.discourse-cdn.com/v4/letter/t/977dab/32.png) [@thegaffer](https://forum.kirupa.com/u/thegaffer)
#### Post date: [July 4, 2006, 6:20pm UTC](https://forum.kirupa.com/t/adding-a-link-to-a-button-from-a-text-file/193140/1 "2006-07-04T18:20:02Z")

</div>

Hi,

I want to be able to add a URL to a button dynamically from a text file if possible.

On the actionscript I have the following:

```auto
loadText = new LoadVars();
loadText.uniq= Math.floor(Math.random()*10000000);
loadText.sendAndLoad("flashstrip.txt", loadText, "GET");
loadText.target = this;
loadText.onLoad = function() {
    this.target.Image.loadMovie(this.Image);
    this.target.Button.html = loadText.BUTTON;
};

```

Whilst “flashstrip.txt” is as follows:

```auto
Image=fla_match.jpg&BUTTON=http://www.google.com

```

However all is not well.

Anyone got any suggestions? - Thank you kindly in advance.
