# Is it possible to link to a local file?

**URL:** <https://forum.kirupa.com/t/is-it-possible-to-link-to-a-local-file/261035>\
**Category:** flash\
**Created:** [May 22, 2008, 8:55am UTC](https://forum.kirupa.com/t/is-it-possible-to-link-to-a-local-file/261035 "2008-05-22T08:55:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![p0c](https://avatars.discourse-cdn.com/v4/letter/p/2acd7d/32.png) [@p0c](https://forum.kirupa.com/u/p0c)\
**Post date:** [May 22, 2008, 8:55am UTC](https://forum.kirupa.com/t/is-it-possible-to-link-to-a-local-file/261035/1 "2008-05-22T08:55:41Z")

</div>

I am trying to save myself a lot of time by trying to get this code to work.

Is it possible to link to a local file?

For example simply link to a locally stored mpeg video that I would like to open over the top of my swf (so it would open in its default player as if you just clicked on it.) I know it may be a security issue but it has got to be possible surely!!

My code I have tried so far doesn’t really work, It came up with a sandbox security error in debug but here is what I tried…

```auto
Security.allowDomain("C://");
var loader:Loader = new Loader( );
	var loaderContext:LoaderContext = new LoaderContext( );
	loaderContext.applicationDomain = ApplicationDomain.currentDomain;
	loaderContext.securityDomain = SecurityDomain.currentDomain;
	loader.load(new URLRequest("C:\Videos\Clip04.mpg"), loaderContext);
	}

```

Please could someone help me out, If I get this working I will dance on my desk!!

Cheers!

---

<div class="post-metadata">

**Author:** ![suntzu61](https://avatars.discourse-cdn.com/v4/letter/s/e95f7d/32.png) [@suntzu61](https://forum.kirupa.com/u/suntzu61)\
**Post date:** [May 22, 2008, 5:09pm UTC](https://forum.kirupa.com/t/is-it-possible-to-link-to-a-local-file/261035/2 "2008-05-22T17:09:54Z")

</div>

Are you trying to run this from the internet somewhere and have it connect to your PC at home??

---

<div class="post-metadata">

**Author:** ![p0c](https://avatars.discourse-cdn.com/v4/letter/p/2acd7d/32.png) [@p0c](https://forum.kirupa.com/u/p0c)\
**Post date:** [May 23, 2008, 7:44am UTC](https://forum.kirupa.com/t/is-it-possible-to-link-to-a-local-file/261035/3 "2008-05-23T07:44:52Z")

</div>

No, this is running on a local machine, connecting to local files in the same directory using the standalone flash player
