FL8: Form Variable Woes

I’ve got a simple form, you change the text, hit ANSWER and it’s supposed to use a VERY simple “If…Else” to give you results.

The problem, however, is that it never seems to work for the positive answer, only the negative. After running a simple trace, the form variable (“babyText”) was not just the word, but instead, tons of HTML formatting and whatnot.

Obviously, this could be the issue - how can a variable confirm if what it’s reading from isn’t the same?

Here’s the .FLA
http://www.bleutuna.com/babyblues/bbf_flash_site_old.fla

Here’s the code I’m using for the “If…else:”

if(babyText == “god”) {
trace(babyText);
} else {
gotoAndStop(1);
}

And here’s the trace results:

<p align="left"><font face="disgusting behavior" size="37" color="#ffffff" letterSpacing="0.000000" kerning="1"><b>(guess)</b></font></p>

Please help me :smiley:


trace(babyText.text);

This gave me the message:

undefined

i don’t have flash 8 here so i cant open your file.

give your babyText textbox the instance name babyText and clear your variable name.

then on some event use


trace(babyText.text);

HAHA! Yay for Google Groups!

THe problem…Auto Kern. Flash 8 allows for it, other versions didn’t, but when you have Auto Kern, Flash adds in all this HTML formatting to make that happen. So, uncheck autokerning, and you can get your variables :smiley:

Oh, happy day!