# Relative path loading in loaded swf

**URL:** https://forum.kirupa.com/t/relative-path-loading-in-loaded-swf/305995
**Category:** flash
**Created:** [March 7, 2010, 8:17pm UTC](https://forum.kirupa.com/t/relative-path-loading-in-loaded-swf/305995 "2010-03-07T20:17:09Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![dipucian](https://avatars.discourse-cdn.com/v4/letter/d/439d5e/32.png) [@dipucian](https://forum.kirupa.com/u/dipucian)
#### Post date: [March 7, 2010, 8:17pm UTC](https://forum.kirupa.com/t/relative-path-loading-in-loaded-swf/305995/1 "2010-03-07T20:17:09Z")

</div>

```auto
/
|-main.swf
|-game
  |-game.swf
  |-assets
    |-a.jpg

```

let’s say I have a file structure like above, I have game.swf loads resource by relative path like “assets/a.jpg”. It runs fine on its own.  
But when I try to load game.swf from main.swf (using relative path again “game/game.swf”) it tries to find a.jpg from “/assets/a.jpg” instead of “/game/assets/a.jpg”  
that was a big surprise to me ![](http://forum.kirupa.com/uploads/kirupa/3383/cad202393927512d.gif)  
do any of you have the same problem~? is there any way to fix it~?

please help~~
