# Setting variables in a loaded movie

**URL:** <https://forum.kirupa.com/t/setting-variables-in-a-loaded-movie/21500>\
**Category:** flash\
**Created:** [May 22, 2003, 6:45am UTC](https://forum.kirupa.com/t/setting-variables-in-a-loaded-movie/21500 "2003-05-22T06:45:39Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![hopesfall](https://avatars.discourse-cdn.com/v4/letter/h/f1d935/32.png) [@hopesfall](https://forum.kirupa.com/u/hopesfall)\
**Post date:** [May 22, 2003, 6:45am UTC](https://forum.kirupa.com/t/setting-variables-in-a-loaded-movie/21500/1 "2003-05-22T06:45:39Z")

</div>

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!!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [May 22, 2003, 7:43am UTC](https://forum.kirupa.com/t/setting-variables-in-a-loaded-movie/21500/2 "2003-05-22T07:43:32Z")

</div>

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