PROBLEM with: _root.createEmptyMovieClip("container", 1);

i am reading kirupa’s tut ( http://www.kirupa.com/developer/mx/loading.htm )about loading external .swf into a container. the problem now is, do i always have to create an empty MovieClip at root level (_root.createEmptyMovieClip(“container”, 1);)? Is it possible to do it inside a MC?

Yes:)

container.createEmptyMovieClip("temp", 1);

will create an (empty) movieclip inside mc container.

scotty(-:

Well said scotty! :thumb:

:stuck_out_tongue:

//Hi Scotty, is it ok? I’ve tried to check the type of “temp”, but that returned undefined
container.createEmptyMovieClip(“temp”, 1);
trace(typeof temp);
//Returned undefined

does the space matter?

typeofexpression

Hey

_root.createEmptyMovieClip(“mymc”, 1)
trace (typeof(mymc));
//Returned Movieclip

Actually what do you mean?

Sorry I’ve made a mistake in the second post this time it is ok

_root.createEmptyMovieClip(“container”, 1);
container.createEmptyMovieClip(“temp”, 1);

trace(typeof (_root.container.temp));//returned movieclip

Glad you’ve found that out;)
@VINc3 :thumb:

scotty(-: