createEmptyMovieClip Problem!

Hello all,

I am using the XML menu one of the memebers on this forum have created. But i am altering the code a little bit and had a problem when using the createMovieClip method.

On one frame i created a movie Clip called “env”:

_root.createEmptyMovieClip(“env”,100);

then on another frame i created two empty clips attached to “env”:
_root.env.createEmptyMovieClip(“movie1”,900);
_root.env.createEmptyMovieClip(“movie2”,950);

now i am loading pictures using the loadMovie method into movie1 and movie2 but movie1 is not appearing when i am running the code although when using trace i am gettign some readings from whiich means that it is created but not appearing.

What is the problem ???

Thanks

might be a problem with your pictures… make a quick test file to check if it loads right - if not, you might have to make sure your jpg is not progressive or whatever and try again.

thanks for the reply

but i tried to create the other movie clip “movie1” which is not showing on the root instead of attaching it to “env” and everything went ok

how are you loading your jpgs into the container movie clips??

its probably a target problem when you load the image make sure its something like this

_root.createEmptyMovieClip(“env”, 1);
env.movie1.onEnterFrame = function() {
env.movie1.loadMovie(“image.jpg”);
};

that might be your problem the targetting of your movieclip

Grim

hello,

Thanks a lot for your point i think that was the problem although i didn’t understand why were the images not visibile.

I changed my code from:
loadMovie(“path”,“movie1”);
to
_root.env.movie1.loadMovie(“path”);

Can anybody explain what was the problem and why it was solved.

Thanks

the problem is your specifying where the container mc is located in this case its movie1, ok first you tell flash to create a empty movie clip in _root wich is called movie1 then your telling flash to load a movie into movie1 but since youre not specifying where movie1 is located because flash created it and its not a actual mc with an instance you need to tell flash where its located so thats basically why it works maybe some of the other guys can explain better if you dont understand but flash works like when youre browsing your computer ie you have a folder with subfolders so you have to specify the full path to the subfolder you want x data loaded into hope you understand if not try doing a search for a tutorial delaing with flashs scope so you can better understand how it works

Grim