I have completed a simple contact form using Flash CS5 and AS2. Instead of having headings such as “your email”, “subject” and “message” outside each text field, they are contained inside each relevant text field and are made up of input text. I would like to do two things:
-
To have the initial text (ie. “Subject”) in a smaller size and heavier weight than the subsequent text typed in by the user.
-
I would also like the initial text (ie. “Subject”) to disappear as soon as the user starts to type in the same box.
Any help would be most appreciated.
Using two text fields seems unpractical. You can use the onSetFocus handler of the textfield and use
setTextFormat()and/orsetNewTextFormat()to change the font, andtext = "";to erase the text.where tf is the text field and format is a valid TextFormat object.