# Loading file from same directory

**URL:** <https://forum.kirupa.com/t/loading-file-from-same-directory/329884>\
**Category:** flash\
**Created:** [November 1, 2012, 10:44am UTC](https://forum.kirupa.com/t/loading-file-from-same-directory/329884 "2012-11-01T10:44:38Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![danhodkinson](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@danhodkinson](https://forum.kirupa.com/u/danhodkinson)\
**Post date:** [November 1, 2012, 10:44am UTC](https://forum.kirupa.com/t/loading-file-from-same-directory/329884/1 "2012-11-01T10:44:38Z")

</div>

Hi,

I have a swf file that i am using in various parts of my site and it is always loading a file with the same ‘textfile.txt’ (the contents of that file change). This is for use on a website

I am struggling to figure out how to load the file from the same directory as the swf. at the moment i am using the

```auto
varReceiver.load("texfile.txt");

```

but it tries to load it from the root of the website.

Any help would be much appreciated.  
Thanks
