Setting variables in a loaded movie

Hi,

Can anyone tell me how to set variables in a child movie from a parent movie?
I used the following code,


createEmptyMovieClip(“Child1”,1);
loadMovie(“child1.swf”, “Child1”);
Child1._x = 150;
Child1._y = 150;
_root.Child1.txtChild=“Hello”;

but it doesn’t work!

txtChild is a variable in the child.swf movie. (A dynamic text field with instance name “ChildText”)

Please help!!

Nevermind guys! I got it…
I had to use onEnterFrame…