# Linking URL's from External TXT file

**URL:** <https://forum.kirupa.com/t/linking-urls-from-external-txt-file/12620>\
**Category:** flash\
**Created:** [February 2, 2003, 7:29pm UTC](https://forum.kirupa.com/t/linking-urls-from-external-txt-file/12620 "2003-02-02T19:29:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![advan](https://avatars.discourse-cdn.com/v4/letter/a/54ee81/32.png) [@advan](https://forum.kirupa.com/u/advan)\
**Post date:** [February 2, 2003, 7:29pm UTC](https://forum.kirupa.com/t/linking-urls-from-external-txt-file/12620/1 "2003-02-02T19:29:16Z")

</div>

Is there a way to Link Buttons to URLS via .TXT files? This way it will be easier to update the buttons URLS. (just edit the .txt file, no need to open flash, anyone could update the links)

🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 2, 2003, 8:12pm UTC](https://forum.kirupa.com/t/linking-urls-from-external-txt-file/12620/2 "2003-02-02T20:12:34Z")

</div>

yes!  
In the textfile type al the URLs like this:

URL1=http://www.url1.url  
URL2=http://www.url1.url

sumthin like that! The first word (URL#) is a variable.

and for a button just add the action

on(release) {  
getURL(URL1);  
}

You can change the variable (URL#) but you have to make sure that in the textfile there’s the same variable

oh and let’s not forget in the first frame of yourmovie add the action:

loadVariables(“yourtextfile.txt”,0);

this loads the textfile so the variables can be used. Just replace yourtextfile with the name of your textfile.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [February 3, 2003, 2:11am UTC](https://forum.kirupa.com/t/linking-urls-from-external-txt-file/12620/3 "2003-02-03T02:11:12Z")

</div>

URL1=http://www.asdfas.com  
&URL2=http://www.www.com

including the “&” made it perfect!

Thx again!! 🙂
