Movie with text fields + changing that text

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

on (release) { 
   set ("", test); 
   set ("", test); 
   set ("", test);; 

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 :slight_smile:

also did this.

tryed to most basic thing

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.

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

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


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: = "hello there!";

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

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