Using two textfield inputs to perform a function
I would like to use two text field inputs to perform a function.
if text1.text = text2.text then gotoAndStop(2);
but its not working.
I would like to use two text field inputs to perform a function.
if text1.text = text2.text then gotoAndStop(2);
but its not working.
Hi.
It's been years since the last time I coded in AS2, but I think it may be what you want:
stop();
txt0.onKillFocus = function()
{
changeFrame();
};
txt1.onKillFocus = function()
{
changeFrame();
};
function changeFrame()
{
if (txt0.text == txt1.text)
gotoAndStop(2);
}
Notice that I chose to fire the comparison when one of the text fields loses focus. But you can fire the comparison using a click of a button, a loop, and so on.
Regards,
JC
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.