PDA

View Full Version : problems with names


Nier
05-30-2003, 11:16 AM
On stage I have lots of buttons and some textfields. I use loadvariables to get text into textfields. It works like this -> I click a button "Red" and it uses _name to set variable whichMovie to _name +"swf". and loads movie.
Problems start when I try to do something like that with textfields. I want to show textfield which variable to use but all i can achieve is to change variable.

Nier
05-30-2003, 03:36 PM
:)
Thank you for trying to help.
I made a sample of my problem.
I want textfield to listen, which button i pressed and then show right text in textfields.

CyanBlue
05-30-2003, 05:42 PM
Um... Call me dumb, but I don't get it... :(

Nier
05-30-2003, 07:30 PM
Uhh :(

when i attach to button "horse" (this._name + "Headline" )= headLine;

When i do this i change value of horseheadline which i loaded from text.txt to "horseHeadline" . But i want it to use horseHeadline which i loaded from text.txt
i just dont want to hardcode each button (40 or something) .. headline = horseHeadline bodytext = HorseBody ...... Headline = OctopusHeadline etc...
and when i decide to add one more textfield then i've got to start again adding code to all buttons.