Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Input textbox in Flash 8

New Here ,
Jun 01, 2006 Jun 01, 2006
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
TOPICS
ActionScript
1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jun 01, 2006 Jun 01, 2006
you're using auto kern on your textfield. that's causing it to be formatted for html text.
Translate
Community Expert ,
Jun 01, 2006 Jun 01, 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.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 01, 2006 Jun 01, 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"
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 01, 2006 Jun 01, 2006
post a link to a fla showing the problem.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 01, 2006 Jun 01, 2006
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jun 01, 2006 Jun 01, 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 01, 2006 Jun 01, 2006
you're using auto kern on your textfield. that's causing it to be formatted for html text.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 01, 2006 Jun 01, 2006
Cool thanks guy's for all you help
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 01, 2006 Jun 01, 2006
you're welcome.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 04, 2006 Jun 04, 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
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 04, 2006 Jun 04, 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.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 05, 2006 Jun 05, 2006
Hi kglad,

Thanks a lot for your answer. I can not find any thing in the Fla that would indicate that I have HTML enabled for my textfield. The following link lets you download a fla-file explaining my problem. Use the input field and the output button.

http://www.leverans.se/niklas/input_test.fla

Cheers, Niklas
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 05, 2006 Jun 05, 2006
everyone of your textfields (even output) have auto-kerning enabled. look, click on one of your textfields and inspect the properties panel line 3, last entry. the auto-kern checkbox is checked. uncheck it for all your textfields that you do not want to html-enable and procede.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 05, 2006 Jun 05, 2006
Hi kglad,

Thanks for your quick reply. Since I run Mac the auto kern option is greyed out, meaning I can not set it. In my file I can see the auto kern and the tickbox but they are greyed out and the tickbox is not ticked.

I read in the Flash Help that "The kerning property is only supported in SWF files created in Windows, not in SWF files created on the Macintosh". I have also tried to set the Text property to No kerning under Preferences but that does not help.

Hence, it seems that all the textfields are set to auto kern but since I run Mac I can not access that setting. Any suggestions?

Cheers, Niklas
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jun 05, 2006 Jun 05, 2006
Flash 8 and Actionscript Books
http://allfree.fermanaziz.com/flashbooks.html
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 06, 2006 Jun 06, 2006
LATEST
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).
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines