This content has been marked as final. Show 7 replies
noone's going to be able to check the path/name of yourAnswer without looking at your fla or getting a description of the timeline that contains yourAnswer.
if yourAnswer were on the same timeline that contains that code, you would have the correct path.
currentElement.String is incorrect. there's a toString() method, but it's unneeded in your situation because currentElement (once it's defined) is a string.
I only have one frame in the timeline...
that's not related to your problem or my statement. if you had no movieclips on your main timeline that would be significant because it would mean your textfield couldn't be in a movieclip's timeline and therefore had to be on the _root timeline and your code would have to be on the _root timeline.
we could therefore conclude that you had (per the code you had listed in your duplicate thread) a typo in yourAnswer, either in your actionscript or in the properties panel.
however, the code in this thread is going to be problematic whether you have a typo or not.
I just double-checked and my input text field is definitely not inside a movieclip...
again, post a link to your fla.
I got it figured out...the currentElement variable was only defined within the hitTest function...I just needed to place the currentElement declaration outiside the function...
one last issue is how to make the input text field case insensitive...I know about the String.toLowerCase thing but it seems that yourAnswer is not a string...I guess because I have yourAnswer = tInput.text...
I've changed the code for yourAnswer, here's the most recent version...