# Problems loading external swfs when the html file isn't in the same folder

**URL:** https://forum.kirupa.com/t/problems-loading-external-swfs-when-the-html-file-isnt-in-the-same-folder/182404
**Category:** flash
**Created:** [March 17, 2006, 8:18pm UTC](https://forum.kirupa.com/t/problems-loading-external-swfs-when-the-html-file-isnt-in-the-same-folder/182404 "2006-03-17T20:18:18Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![sustain](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sustain](https://forum.kirupa.com/u/sustain)
#### Post date: [March 17, 2006, 8:18pm UTC](https://forum.kirupa.com/t/problems-loading-external-swfs-when-the-html-file-isnt-in-the-same-folder/182404/1 "2006-03-17T20:18:18Z")

</div>

I’m having Problems loading external swfs.

In the main folder where my index file resides, I have online.htm. Online.htm has a flash file (thumbnails.swf) that resides in a folder titled video.

In the video folder, there are swfs that are loaded into thumbnail.swf

If I open up thumbnail.swf by itself, it loads the swfs just fine.

When I had online.htm in the video folder, it worked as well. I am not able to keep the htm file in the folder, it must reside in the root directory because of a secure login I am using.

When online.htm is in the root directory, the thumbnail.swf file shows up, but the buttons stop working.

Here is the code that is on the buttons:

```auto
on (press) {
loadMovie("15.swf","_level1");
}

```

Like I said, that code works fine when I open up thumbnails.swf by itsself, its broken when I have thumbnails.swf embedded in html and I move the html file outside of the video directory.

I had thought I had a workaround. I had a redirect that was protected by the login, and then it would redirect to the online.htm when it was in the video folder. It sort of worked, but not perfectly.

Is there something I can do to the code to make it work perfectly, or is there no hope for this to work, and I have to find some other login script?

---

<div class="post-metadata">

### Author: ![sustain](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sustain](https://forum.kirupa.com/u/sustain)
#### Post date: [March 22, 2006, 4:32pm UTC](https://forum.kirupa.com/t/problems-loading-external-swfs-when-the-html-file-isnt-in-the-same-folder/182404/2 "2006-03-22T16:32:15Z")

</div>

Hm. It just doesn’t make sense that it wouldnt load them if its in html, but they load fine if i open the swf…

---

<div class="post-metadata">

### Author: ![rhamej](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@rhamej](https://forum.kirupa.com/u/rhamej)
#### Post date: [March 22, 2006, 4:42pm UTC](https://forum.kirupa.com/t/problems-loading-external-swfs-when-the-html-file-isnt-in-the-same-folder/182404/3 "2006-03-22T16:42:00Z")

</div>

Your html becomes the -root when the swf is embeded into it.

```auto

on (press) {
loadMovie("video/15.swf","_level1");
}

```

---

<div class="post-metadata">

### Author: ![sustain](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sustain](https://forum.kirupa.com/u/sustain)
#### Post date: [March 22, 2006, 8:08pm UTC](https://forum.kirupa.com/t/problems-loading-external-swfs-when-the-html-file-isnt-in-the-same-folder/182404/4 "2006-03-22T20:08:46Z")

</div>

> [@rhamej](#):
>
> Your html becomes the -root when the swf is embeded into it.  
> ActionScript Code:  
> [FONT=Courier New][LEFT][COLOR=#0000FF]on[/COLOR] COLOR=#000000[/COLOR] [COLOR=#000000]{[/COLOR]  
> [COLOR=#0000FF]loadMovie[/COLOR]COLOR=#000000[/COLOR];  
> [COLOR=#000000]}[/COLOR]  
> [/LEFT]  
> [/FONT]

Thanks a lot! That makes sense. I’ll give that a try in a second and let you know if that works.

---

<div class="post-metadata">

### Author: ![sustain](https://avatars.discourse-cdn.com/v4/letter/s/e47774/32.png) [@sustain](https://forum.kirupa.com/u/sustain)
#### Post date: [March 22, 2006, 8:39pm UTC](https://forum.kirupa.com/t/problems-loading-external-swfs-when-the-html-file-isnt-in-the-same-folder/182404/5 "2006-03-22T20:39:33Z")

</div>

rhamej, thanks for the code. It works perfectly now!

---

<div class="post-metadata">

### Author: ![rhamej](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@rhamej](https://forum.kirupa.com/u/rhamej)
#### Post date: [March 22, 2006, 10:58pm UTC](https://forum.kirupa.com/t/problems-loading-external-swfs-when-the-html-file-isnt-in-the-same-folder/182404/6 "2006-03-22T22:58:17Z")

</div>

:thumb:
