# File access

**URL:** <https://forum.kirupa.com/t/file-access/290535>\
**Category:** flash\
**Created:** [June 16, 2009, 7:55am UTC](https://forum.kirupa.com/t/file-access/290535 "2009-06-16T07:55:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yargling](https://avatars.discourse-cdn.com/v4/letter/y/96bed5/32.png) [@Yargling](https://forum.kirupa.com/u/Yargling)\
**Post date:** [June 16, 2009, 7:55am UTC](https://forum.kirupa.com/t/file-access/290535/1 "2009-06-16T07:55:10Z")

</div>

I’ve written a SWF in FlashDevelop (using the open Flex stuff) and use it to load up a bunch of image files.

```auto
public function funcA(file:String):void {
    var m_Ldr:Loader = new Loader();
    m_Ldr.load(new URLRequst(file));
    m_Ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, funcB);
}

public function funcB(evt:Event):void {
    m_Bitmap = Bitmap(m_Ldr.content);
}

```

Now, this works fine in the debugger environment with, say, funcA(“test1.jpg”), but when I try and copy the files into another directory, I get security errors, something about it not being ‘Local with trusted’ or some such.

I assume local file access is possible via Flash if the SWF is on the harddrive too, right? I did try adding a Security.allowDomain("\*"); to see if that made a difference, but seems not.

If local file access isn’t possible, do I have to find a server to copy everything onto even for just testing stuff?
