# Movie with text fields + changing that text

**URL:** <https://forum.kirupa.com/t/movie-with-text-fields-changing-that-text/239>\
**Category:** Uncategorized\
**Created:** [July 10, 2002, 8:57pm UTC](https://forum.kirupa.com/t/movie-with-text-fields-changing-that-text/239 "2002-07-10T20:57:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clemens](https://avatars.discourse-cdn.com/v4/letter/c/df788c/32.png) [@Clemens](https://forum.kirupa.com/u/Clemens)\
**Post date:** [July 10, 2002, 8:57pm UTC](https://forum.kirupa.com/t/movie-with-text-fields-changing-that-text/239/1 "2002-07-10T20:57:07Z")

</div>

Hello there,

I just started playing with scripting and here is a question i got.

I got 1 button.  
A movie with containts 3 graphics , graph1 , graph2 , graph3  
Each graphic contains a Dynamic Text field.  
The var of that field within graph1 = text1, graph2 = text2 etc.

On release should put the text “test” in each of the textfields  
and should play the whole movie wich contains the graphics with the textfields.

this is the code i made

```auto

on (release) { 
    
   set ("_root.movie.graph1.text1", test); 
   set ("_root.movie.graph2.text2", test); 
   set ("_root.movie.graph3.text3", test); 
   movie.play(); 
} 

```

Nothing happends.

I know its verry basic but im trying to learn the basic scripting.  
Did almost all of the beginner turtorials but still i cant fix this.

When this works i wanna make a menu.  
When you realese a button a little movie starts wich contains the name of the section wich was choosen.  
The movie will be the same for every button but the text must be differend.  
Could do this with tweening but i wanna learn scripting 🙂

also did this.

tryed to most basic thing

```auto

on ( release) { 
       _root.text4="test"; }

```

just 1 button and 1 text field works fine.  
As soon as i put the text field into a graphic/movie ( graph4 ) it doesn work.

```auto

on ( release) { 
       _root.graph4.text4="test"; }

```

btw , i got flash5.  
well , gonna try some more.

Clemens

---

<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:** [July 10, 2002, 10:42pm UTC](https://forum.kirupa.com/t/movie-with-text-fields-changing-that-text/239/2 "2002-07-10T22:42:46Z")

</div>

it will have to be a movie you put it in, a graphic won’t work.

make sure the instances of your movies are named, not just the movie.

i’m a little confused on why your simple example worked. was  
text4 a variable or a text field?

a text field’s content can be referenced by myTextField.text

so if you had a text field named “tt” in a movie named “mm” which was in the \_root timeline, this would work:

```auto

_root.mm.tt.text = "hello there!";

```

be sure not to confuse the **variable** a text field may be referencing with the **instance name** of that text field.

---

<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:** [July 11, 2002, 4:40pm UTC](https://forum.kirupa.com/t/movie-with-text-fields-changing-that-text/239/3 "2002-07-11T16:40:07Z")

</div>

thanks for your help, i finnaly got it moving and changing.

Clemens.
