PDA

View Full Version : Im trying to link a button to a dynamic text field


jajabinx35
12-24-2008, 05:05 AM
Hi folks!

Im trying to link a button to a dynamic text field. E.g. if i press the button, the letter 'q' shows on the text field. My code is the following:


on (release){


entrypoint.text = 'q';
}

This works!!! but when pressing the button again, the text field doesn't add another 'q'.

So then, can anyone help me on how to add as many 'q's' to the text field, by clicking on the button?

Mazoonist
12-24-2008, 05:11 AM
Try this:

entrypoint.text += 'q';

The plus-equals 'q' means take whatever the current value is and add the string 'q' to it. It's the same as saying:

entrypoint.text = entrypoint.text + 'q';

Either one will work, but the first version is shorter, and easier to type. Just takes a little getting used to.

jajabinx35
12-24-2008, 01:07 PM
Thank you! It worked!!! :)

This site is the best!