# Loading external swf in AIR

**URL:** <https://forum.kirupa.com/t/loading-external-swf-in-air/260169>\
**Category:** Uncategorized\
**Created:** [May 13, 2008, 3:47am UTC](https://forum.kirupa.com/t/loading-external-swf-in-air/260169 "2008-05-13T03:47:58Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![yankeedoodles](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/yankeedoodles/32/812_2.png) [@yankeedoodles](https://forum.kirupa.com/u/yankeedoodles)\
**Post date:** [May 13, 2008, 3:47am UTC](https://forum.kirupa.com/t/loading-external-swf-in-air/260169/1 "2008-05-13T03:47:58Z")

</div>

In AS3 this would load loadme.swf into my holding mc (contentmc) provided both the holding swf and loadme.swf are in the same directory

var loaderMC:Loader=new Loader();  
loaderMC.load(new URLRequest(“loadme.swf”));  
contentmc.addChild(loaderMC);

But it does not work in AIR. Any reason why? what am i missing out or is there a new way to do it?

thanks

---

<div class="post-metadata">

**Author:** ![Rezmason](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/rezmason/32/30447_2.png) [@Rezmason](https://forum.kirupa.com/u/Rezmason)\
**Post date:** [May 13, 2008, 4:26am UTC](https://forum.kirupa.com/t/loading-external-swf-in-air/260169/2 "2008-05-13T04:26:54Z")

</div>

I’m also wondering this. My current theory is that “loadme.swf” defaults to three different things, based on several factors:

If it’s a local file– "file://./loadme.swf"  
If it’s a remote file- "http://./loadme.swf"  
If it’s a file in AIR- “app://./loadme.swf”

You may want to try typing it out fully, “file://./loadme.swf”, so that it knows where to look.

---

<div class="post-metadata">

**Author:** ![yankeedoodles](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/yankeedoodles/32/812_2.png) [@yankeedoodles](https://forum.kirupa.com/u/yankeedoodles)\
**Post date:** [May 13, 2008, 5:53am UTC](https://forum.kirupa.com/t/loading-external-swf-in-air/260169/3 "2008-05-13T05:53:52Z")

</div>

thanks for the suggestion but i dont think think it works…cos i tried it and it gave me a URL cannot be found msg…  
Any more ideas? or is there a way for AIR to “look in this application’s path” directly?

thanks  
murtaza
