There is another type of variable that you should know about before you go too far into your flash career - The Text Field. This is actually a variable believe it or not and should be treated the same as any other variable. The only difference is a text field stores AND displays its value. Let's have a look at one:
text = "Hello";
The Variable "text" is the name of the text field. Let's now look at how to set up and use one.
Firstly you have to create the text field. Do this by clicking on the text tool in the tool bar.
Now draw your text box on the stage. Once you have done this, right-click on the text field and select panels > Text Options from the context menu. This will present the Text Options panel. From here you will be able to change the properties of the text field (more on this in a later tutorial). What we are concerned with here is the variable name. If you remember earlier, the variable used was called "text". Place this name into the space provided labelled "Variable".
Now when ever you give a value to the "text" variable it will be displayed in this text field for all to see.
|» Level Basic|
Rating: 8 Votes: 198
|Eddie was a Content Editor at Flashkit.com and is actually a sentient Gateway Solo 2150xl notebook that suffers from acute lysdexia and caffeine addiction. He is carried on the shoulders of a semi-autonomous human called "Body".|
|Download the files used in this tutorial.|
|Download (27 kb)|
|More help? Search our boards for quick answers!|