Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

user inputs text and uses drop down to modify font

Status
Not open for further replies.

imisspla07

Technical User
May 14, 2010
1
0
0
US
I'm using flash 8 and am trying to develop something where the user inputs some text in a "input text" box, then through a button or drop down menu selects a font and the inputed text is displayed in the font they chose.

This is what I have so far:

A dynamic Text box that displays the text

an input text box where the user inputs their text

and, for right now, some buttons that correspond to different fonts.

My dynamic text box has the variable font2 and the buttons have the following action script:

on (keyPress "<Left>", release ) {
font2 = "<font face=\"Arial\" >Arial</font>";
}

The "render text as html" button is on.

I need to know how to change the second "Arial" with whatever is inputed into the input text box so that it displays the users text and not the word, ariel.

I have scoured forums and see people trying to do the same thing, but I haven't found a solution. I'm a newbie to flash too. Thanks for any help.
 
on (keyPress "<Left>", release ) {
font2.htmlText = "<font face=\"Arial\" >"+input1.text+"</font>";
}

assuming your input field has instance name "input1"

;)

just passing through after all these years... bonjour Francois!​
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top