Skip to main content
Participating Frequently
June 1, 2006
Answered

Input textbox in Flash 8

  • June 1, 2006
  • 8 replies
  • 1448 views
Hi All, I came across a problem this morning I was able to find a work around.
I have a standard input textbox and a button. What I want to do is on(release) trace the value of the input textbox (No big deal right )

this is what my trace comes back as: (Not good when you are trying to get var's)
<TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="Times" SIZE="12" COLOR="#000000" LETTERSPACING="0" KERNING="0">Hello World</FONT></P></TEXTFORMAT>

now the work around is I save the file as a MX04 test again and it comes back as
Hello World

So what is up with this? Any ideas?

Thanks
Bobby
This topic has been closed for replies.
Correct answer kglad
you're using auto kern on your textfield. that's causing it to be formatted for html text.

8 replies

kglad
Community Expert
June 6, 2006
if you can't untick in the authoring environment, you'll need to use actionscript. and that means your back to your original issue: for each textfield that you want to NOT be html-enabled, you'll need to execute a tf.html=0; statement where tf is your textfield's instance name (or variable).
June 5, 2006
Flash 8 and Actionscript Books
http://allfree.fermanaziz.com/flashbooks.html
kglad
Community Expert
June 1, 2006
you're welcome.
New Participant
June 4, 2006
Hi,

I have experienced the same problem but still with the auto kern option unselected I get the HTML output. I run Mac and I read in the Help for Flash that kerning is not available for Mac. Does anyone know if it is possible to get around this using a Mac without having to set every input field to .html = false;? That solves the problem but is a bit cumbersome.

Cheers, Niklas
kglad
Community Expert
June 4, 2006
you must be doing something to make them html-enabled. if you can't figure out what that is, post a link to a fla displaying the problem.
BobbyP57Author
Participating Frequently
June 1, 2006
Cool thanks guy's for all you help
kglad
kgladCorrect answer
Community Expert
June 1, 2006
you're using auto kern on your textfield. that's causing it to be formatted for html text.
kglad
Community Expert
June 1, 2006
post a link to a fla showing the problem.
BobbyP57Author
Participating Frequently
June 1, 2006
Participating Frequently
June 1, 2006
This is weird. Never noticed that behavior before. Here is what I did to work around it but not sure why it acts this way in the first place.

I named the input textfield instance: "input_txt", you could name it whatever you like. Then I had to set the ".html" property to false. So in the first frame I add the following code:

input_txt.html = false;
stop();

Then the trace behaved as expected.

Another item I found strange was that before I did that, I set fName to a value and had it pre-populate the textfield. When I click the black button, the trace was just the word without the HTML code. But, then I type some information in the box and clicked the button again and the results were wrapped in HTML code.

Tim
BobbyP57Author
Participating Frequently
June 1, 2006
kglad. I do not have the "Render as html" pressed.

I also try to stay away from components I find them a pain in the a$$

any other options
Thanks

I got the component to work -- Thanks. but still is this a "Feature"
kglad
Community Expert
June 1, 2006
that's the output from an html-enabled textfield. the textinput component is not html-enabled.

post a link to a sample file showing that problem.