# Make a url link to text file...?

**URL:** https://forum.kirupa.com/t/make-a-url-link-to-text-file/242153
**Category:** Uncategorized
**Created:** [October 23, 2007, 1:32am UTC](https://forum.kirupa.com/t/make-a-url-link-to-text-file/242153 "2007-10-23T01:32:57Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![creyentededios](https://avatars.discourse-cdn.com/v4/letter/c/ac91a4/32.png) [@creyentededios](https://forum.kirupa.com/u/creyentededios)
#### Post date: [October 23, 2007, 1:32am UTC](https://forum.kirupa.com/t/make-a-url-link-to-text-file/242153/1 "2007-10-23T01:32:57Z")

</div>

so i have a flash file and in it, it imports a text file from my server and displays the text

heres my code:

```auto
var man_laws:LoadVars = new LoadVars();
man_laws.onData = function(src:String):Void {
    if (src != undefined) {
        my_txt.text = src;
    } else {
        my_txt.text = "Unable to load external file.";
    }
};
man_laws.load("http://mysite.com/ml.txt");

```

theres the code i have that gets the info on the text file and displays it

no what i would like to do is somethin like that  
when i embed the file, i can put a url to a text file in the embed:

```auto
http://mysite.com/test.swf?url=http://mysite.com/test.txt

```

i would like to be able to do that  
but if it cant find that text file, then it defaults to the “[http://mysite.com/ml.txt](http://mysite.com/ml.txt)” file

do you know how to do that?  
thanx for your help
