# Loading SWF, paths get messed up...help!

**URL:** <https://forum.kirupa.com/t/loading-swf-paths-get-messed-up-help/52744>\
**Category:** flash\
**Created:** [May 26, 2004, 10:06pm UTC](https://forum.kirupa.com/t/loading-swf-paths-get-messed-up-help/52744 "2004-05-26T22:06:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jaslgv](https://avatars.discourse-cdn.com/v4/letter/j/c77e96/32.png) [@jaslgv](https://forum.kirupa.com/u/jaslgv)\
**Post date:** [May 26, 2004, 10:06pm UTC](https://forum.kirupa.com/t/loading-swf-paths-get-messed-up-help/52744/1 "2004-05-26T22:06:16Z")

</div>

Hi all!

I have my main flash file that plays from the root dir. In that main file I use the loadmove to load " 1/1.swf"

the new file inside of folder 1 (1.swf) loads vars from two folders "data and images.

When I go to test everything, I lose the paths for my file 1.swf. Its looking to load “root/data/data.txt” from the root dir, not from the 1 folder. It should look for “root/1/data/data.txt”

Thanks in advanced…really need help on this one.

HERE IS MY CODE:  
This is the code that loads 1.swf .It is in a blank MC located on the main timeline. Its file location is:  
root/main.swf

this.loadMovie(“1/1.swf”);

This is the code inside 1.swf that loads its data and images, its file location is:  
root/1/1.swf

lvObj = new LoadVars();  
lvObj.load(“data/data.txt”);  
lvObj.onLoad = function(ok)  
{  
if(ok)  
{  
myColor = new Color(mc\_colorp); // \_mc is the instance name of the movieclip  
myColor.setRGB(lvObj.colorp);

myColorS = new Color(mc\_colors); // \_mc is the instance name of the movieclip  
myColorS.setRGB(lvObj.colors);

}  
}
