I am making a text field that must change every time a user clicks the next button.
I know how to change the text of a AS created text field and change it once more with but I need to change it about 50 times +.
Do you know what an array is?
if not it is just a list of items (text strings in your case) that looks like
myArray[“text1”, “text2”, …, “text9999999”];
where you store your text and the access it with something like:
_root.times = 0;
myButt.onpress = function(){
_root.times++;
_root.myTextField.text = myArray[_root.times];
}
Note that the first item on an array has got an index number of 0
You might want to take your code one step further, and put in an IF. This will stop the user from adding or subtracting to your “times” variable. Basically if the user were to hit the back button 3 times when you first came to your movie, it would take 3 clicks for them to get back to 0, where your first text is located. Likewise, if they were to keep hitting next once, you got to the end, it would take them that many clicks to get back to your content. This just stops the user from being able to click past your beginning and your end.
See I am making this for my signature, so that the text field will keep talking to you, the only problem now is that I have to make the user have a text field so that he/she can enter data. Which I beleive is only a create text field and a .type = “input”.