Load image

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.

try “…/imag/habitaciones.jpg”

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

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

or

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

Notice also that it is _root, not root. :slight_smile:

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

Oh, and what Mathew said… ^^

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:

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

or

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

Notice also that it is _root, not root. :slight_smile:

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

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