# \[mx\] Path to dynamic textfield in loaded movie

**URL:** <https://forum.kirupa.com/t/mx-path-to-dynamic-textfield-in-loaded-movie/29097>\
**Category:** flash\
**Created:** [August 22, 2003, 5:32am UTC](https://forum.kirupa.com/t/mx-path-to-dynamic-textfield-in-loaded-movie/29097 "2003-08-22T05:32:42Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jhoward](https://avatars.discourse-cdn.com/v4/letter/j/2acd7d/32.png) [@Jhoward](https://forum.kirupa.com/u/Jhoward)\
**Post date:** [August 22, 2003, 5:32am UTC](https://forum.kirupa.com/t/mx-path-to-dynamic-textfield-in-loaded-movie/29097/1 "2003-08-22T05:32:42Z")

</div>

I’m trying to access the dynamic textfield of a swf loaded into an empty movie clip created in the main timeline.

I understand how to manipulate a dynamic textfield in the main timeline, but trying to access the dynamic textfield of an external swf loaded into an empty movie clip results in failure. I guess I’m mainly having problems understanding the path structure involved.

createEmptyMovieClip(‘menu0’,1);  
menu0.loadMovie(‘menubg.swf’);  
menu0.kitten.text=“hello”; //where kitten is the instance name of the dynamic textfield in the external swf

Am I required to reference the created instance name? The instance name of the symbol that happens to contain the dynamic textfield of the external swf? Just the instance name of the textfield?

Some pointers would be appreciated.

---

<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:** [August 22, 2003, 5:50am UTC](https://forum.kirupa.com/t/mx-path-to-dynamic-textfield-in-loaded-movie/29097/2 "2003-08-22T05:50:52Z")

</div>

If you loaded your external SWF on an empty movie clip you can access you dynamic textfield inside that SWF using the instance name of your empty movie clip. So basically it goes like this…

[name of your empty MC].menu0.kitten.text = “hello world!”;

This is assuming of course that the empty movie clip where you loaded your external SWF is in the \_root timeline!

Hope this helps! Cheers!

🙂

---

<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:** [August 22, 2003, 2:33pm UTC](https://forum.kirupa.com/t/mx-path-to-dynamic-textfield-in-loaded-movie/29097/3 "2003-08-22T14:33:00Z")

</div>

[name of your empty MC].menu0.kitten.text = “hello world!”;

Isn’t the instance name of the empty movie clip already “menu0” ?  
createEmptyMovieClip(‘menu0’,1);

Where is the “name of the empty MC” derived? The controling SWF, or the loaded SWF?

---

<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:** [August 23, 2003, 2:18am UTC](https://forum.kirupa.com/t/mx-path-to-dynamic-textfield-in-loaded-movie/29097/4 "2003-08-23T02:18:05Z")

</div>

hmmm… yeah. Hey can you post your file so I can take a whack at it?

---

<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:** [August 23, 2003, 4:16am UTC](https://forum.kirupa.com/t/mx-path-to-dynamic-textfield-in-loaded-movie/29097/5 "2003-08-23T04:16:28Z")

</div>

I was eventually able to get it to work by changing tacts – loading the swf from the internal library via attachMovie. Here’s the FLA.

It still seems like there should be a potential use for accessing the field in an external swf loaded via loadMovie. I’ve tried just about every path structure I can think of, but once the attachMovie technique started working – I kind of gave up.

---

<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:** [August 23, 2003, 4:52am UTC](https://forum.kirupa.com/t/mx-path-to-dynamic-textfield-in-loaded-movie/29097/6 "2003-08-23T04:52:50Z")

</div>

Hey man that file didn’t open but i managed to make something similar to your problem. See attached.

---

<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:** [August 23, 2003, 4:53am UTC](https://forum.kirupa.com/t/mx-path-to-dynamic-textfield-in-loaded-movie/29097/7 "2003-08-23T04:53:44Z")

</div>

Sorry about that i forgot to attach the file.

---

<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:** [August 23, 2003, 5:29am UTC](https://forum.kirupa.com/t/mx-path-to-dynamic-textfield-in-loaded-movie/29097/8 "2003-08-23T05:29:54Z")

</div>

Thanks comicGeek! I took a look at your code to see what I was doing differently. Apparently, the creation of the empty clip and the loading of the movie can’t be encased within a function.

I reposted my FLA (MX Format) as a zip, so it might work for you now. Here’s the swf in case it doesn’t. [http://www.howardesign.com/exp/mx/menu/](http://www.howardesign.com/exp/mx/menu/)

What I’m trying to do is iterate the emptymovieclip/load in a loop to create items in a dropdown menu. But that means the generation can’t be done upfront, given an unknown number of menu items (they’re being pulled from an array currently, but potentially from an XML File).

I’m glad to see that it _is_ possible to load text into an external swf. I appreciate your help.
