Hi,
When working with dynamic or input textfields, it is a better habit to learn to use instance names. Variable names for textfields are generally used by backend scripts. Learning to use variables in code is quite valuable. For example....
Code:
myButton.onRelease=function(){
userName=myInputTextField.text;
}
When the user releases the button, whatever data is in the input textfield is assigned to the variable "userName" throughout the entire movie.Now, all you need to do is use the variable name in the text...
Code:
myWelcomeTextField.text= "Hello" + userName +" Welcome to our website";
However, the data is not persistant and the user will need to enter this information each time the movie is opened. There are two ways to achieve persistant data in a flash movie. One is with the shared object that is internal to flash. It is basically Flash's version of an HTML cookie. The other way is to use a backend script to save the data to a database or even a flat textfile that is loaded into flash each time the movie runs.
Regards
NTD
A mind once stretched by a new idea never regains its original dimensions.
- Oliver Wendell Holmes
Bookmarks