This content has been marked as final. Show 17 replies
I just tried that using Flash 8 and it worked fine saving to Flash 8
player, using either AS1 or AS2.
I don't know of any other settings that could get in the way.
and what's the problem with the code you showed?
If my publish settings are on Flash Player 8, It returns NaN for the "freakinanswer" text and the trace statements when new input is added.
if publish settings are for Flash Player 7, it works.
I'm currently publishing to 7 to have the file up and running, but if I need this functionality with Flash 8 features I don't want to be hosed.
the actual (published as a fp7) file I want this for can be seen at hydrus.com/calculations.html
your freakin textfields are probably html-enabled, have auto-kern ticked or something equivalent. what do you see when you use trace(freakin1), for example, after entering a number in that textfield?
html and kerning are off.
If I click "mcFreakingButton" to get "freakinanswer" without entering new values (i.e. using the values defined when I instantiate the "freakin1" and "freakin2" variables) it works. When I enter numbers into the Input text fields, I get NaN.
re-read my mesage and report the results.
If I trace(freakin1) instead of Number(freakin1) as I have above, I get:
<TEXTFORMAT LEADING="4"><P ALIGN="LEFT"><FONT FACE="arial" SIZE="28" COLOR="#000000" LETTERSPACING="0" KERNING="0">3</FONT></P></TEXTFORMAT>
in the output window and NaN in the freakinanswer field
I did verify that the render text as HTML button is off.
In case I'm too obtuse to follow or if I'm steaming anyone's beans, I put the FLA, the SWF and the code on my web site
I downloaded your fla to take a look. I loaded it in flash 8. You have auto-kerning enabled for both of your input fields fk1 and fk2 and fk2 is html enabled. Take those away and it works.
I did inadvertently turn on html in the file I posted (i'm a twit) so I turned it back off.
My Auto kern box in the Properties window is grayed out for the two input text fields and the Dynamic text field.
I'm on a Mac, does that matter?
no, it doesn't matter what computer you're using. your trace reveals you have exactly the problem i mentioned.
click on an empty part of the stage and then click on one of your input textfields. is html-enabled or auto kern ticked? if so, fix it and retest.
as long as you see <TEXTFORMAT... etc, your textfield is still html enabled.
I got the fields to work by converting them from Input to Static text fields. Then and only then was Auto Kern available. I turned Auto Kern off and then set the text fields back to Input fields. Then it worked. Weird, huh?
Should Auto Kern be available when the text field is set as Input Text? Is Flash somehow wonked on my system?
In either case, thanks to all who replied for your time and help.
yes, auto kern should be available for all textfield types. i'm not sure if it's available for all fonts, but i've never seen a font for which it is not available.
On my personal and work copies (both Mac versions) Auto Kern isn't an available selection on an Input or Dynamic text field.
Any other Mac users out there who can chime in? I'd like to know if I just have something set goofy or if Adobe/Macromedia did something goofy on the Mac version.
Flash 8 on a Mac has Auto kern greyed out for both Input and Dynamic
Text. On Windows Auto kern is set to On by default for both Input and
Dynamic, as well as Static.
On the Mac version Auto kern is set to Off by default for Static text.
Flash CS3 on a Mac has Auto kern greyed out for both Input and Dynamic
text, it is set to On by default for Static Text.
I don't have a Windows copy of Flash CS3 to check.
In testing your first example again, it will work fine if the render as
HTML option is not selected for either of the input text fields.
that's not very nice of adobe.
I get the feeling adobe's Flash IDE developers has been stretched too thinly, and the Macintosh version has suffered.