# Flex inside Flash? \[AS3\]

**URL:** <https://forum.kirupa.com/t/flex-inside-flash-as3/237132>\
**Category:** flash\
**Created:** [August 27, 2007, 4:15pm UTC](https://forum.kirupa.com/t/flex-inside-flash-as3/237132 "2007-08-27T16:15:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ff45t1z](https://avatars.discourse-cdn.com/v4/letter/f/f1d935/32.png) [@ff45t1z](https://forum.kirupa.com/u/ff45t1z)\
**Post date:** [August 27, 2007, 4:15pm UTC](https://forum.kirupa.com/t/flex-inside-flash-as3/237132/1 "2007-08-27T16:15:10Z")

</div>

Perhaps I’m doing something wrong, but i’m having some issues loading Flex applications into an SWF based site design. I’m using the correct Syntax, I know this. I’m using this code:

var ldr:Loader = new Loader();  
var url:String = “albums.swf”;  
var urlReq:URLRequest = new URLRequest(url);  
ldr.load(urlReq);  
content\_mc.content\_page2\_mc.disc\_mc.addChild(ldr);

^ yes, laugh at the last line if you want. But that’s not the issue.  
The problem is, I receive a security error upon execution.

> Error #2044: Unhandled SecurityErrorEvent:. text=Error #2140: Security sandbox violation: file:///C:/Documents and Settings/ArchiteKt/My Documents/DZN2/RSK/dev/fla/index.swf cannot load file:///C:/Documents and Settings/ArchiteKt/My Documents/DZN2/RSK/dev/fla/albums.swf. Local-with-filesystem and local-with-networking SWF files cannot load each other.

( God, don’t all the folder addresses look silly from here? haha. )

But anyway, perhaps someone can shed some light on what I’m doing wrong.  
Any help is appreciated.
