# Load image

**URL:** https://forum.kirupa.com/t/load-image/205014
**Category:** Uncategorized
**Created:** [October 25, 2006, 12:17pm UTC](https://forum.kirupa.com/t/load-image/205014 "2006-10-25T12:17:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![hema77](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@hema77](https://forum.kirupa.com/u/hema77)
#### Post date: [October 25, 2006, 12:17pm UTC](https://forum.kirupa.com/t/load-image/205014/1 "2006-10-25T12:17:40Z")

</div>

I have the following code which I have to change becuase the .fla file is in another folder named gr. Both ‘imag’ and ‘gr’ folders are in the folder ‘web’

root.createEmptyMovieClip(“loop”,root.getNextHighestDepth());

contenedor.loadMovie(“imag/habitaciones.jpg”);

I have tried writing

root.createEmptyMovieClip(“loop”,root.getNextHighestDepth());

contenedor.loadMovie(“web/imag/habitaciones.jpg”);

However it still does not work.

Please help.

---

<div class="post-metadata">

### Author: ![mathew\_er](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@mathew\_er](https://forum.kirupa.com/u/mathew_er)
#### Post date: [October 25, 2006, 12:35pm UTC](https://forum.kirupa.com/t/load-image/205014/2 "2006-10-25T12:35:24Z")

</div>

try “…/imag/habitaciones.jpg”

---

<div class="post-metadata">

### Author: ![Doccie](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/doccie/32/2944_2.png) [@Doccie](https://forum.kirupa.com/u/Doccie)
#### Post date: [October 25, 2006, 12:37pm UTC](https://forum.kirupa.com/t/load-image/205014/3 "2006-10-25T12:37:11Z")

</div>

Why do your movieclips have seperate names? If you name the empty movieclip loop, you should also use loop.loadMovie. So it’s either:

```auto
_root.createEmptyMovieClip("loop", _root.getNextHighestDepth()); 
_root.loop.loadMovie("../imag/habitaciones.jpg");

```

or

```auto
_root.createEmptyMovieClip("contenedor", _root.getNextHighestDepth()); 
_root.contenedor.loadMovie("../imag/habitaciones.jpg");

```

Notice also that it is \_root, not root. 🙂

Is this what you meant or am I reading your question wrong?

Oh, and what Mathew said… ^^

---

<div class="post-metadata">

### Author: ![hema77](https://avatars.discourse-cdn.com/v4/letter/h/49beb7/32.png) [@hema77](https://forum.kirupa.com/u/hema77)
#### Post date: [October 25, 2006, 12:49pm UTC](https://forum.kirupa.com/t/load-image/205014/4 "2006-10-25T12:49:59Z")

</div>

thanks!! just working out on somebody else’s project… so don’t know why they have seperate movieclips… Anyways, thanks a lot

[quote=Doccie;1985120]Why do your movieclips have seperate names? If you name the empty movieclip loop, you should also use loop.loadMovie. So it’s either:

```auto
_root.createEmptyMovieClip("loop", _root.getNextHighestDepth()); 
_root.loop.loadMovie("../imag/habitaciones.jpg");

```

or

```auto
_root.createEmptyMovieClip("contenedor", _root.getNextHighestDepth()); 
_root.contenedor.loadMovie("../imag/habitaciones.jpg");

```

Notice also that it is \_root, not root. 🙂

Is this what you meant or am I reading your question wrong?

Oh, and what Mathew said… ^^[/quote]
