Hi guys, Iām stuck, please helpā¦
Iām creating a keypad which uses buttons to enter numbers into an input textfield.
I can get the buttons to enter numbers into the field but canāt figure out how it knows the code is correct.
Iāve attached the fla to explain what I mean.
Code used so far:
On button 1:
[INDENT]on (press)
{
this.number=ā1ā
}
on (press)
{
_root.code.text+=this.number;
}[/INDENT]
on the Submit button:
[INDENT]on (release)
{
if (code == ā111ā)
{
gotoAndStop(10);
}
else
{
gotoAndStop(1);
}
}[/INDENT]
system
July 14, 2004, 3:55pm
2
If youāre dealing with numbers, you shouldāve used the textboxes variable instead of instance name. I donāt know, itās sort of confusing but try this instead of what you had for the submit button:
on (release) {
if (code**.text** == "111") {
gotoAndStop(10);
} else {
gotoAndStop(1);
}
}
system
July 14, 2004, 3:59pm
3
If youāre dealing with numbers, you shouldāve used the textboxes variable instead of instance name. I donāt know, itās sort of confusing but try this instead of what you had for the submit button:
on (release) {
if (code**.text** == "111") {
gotoAndStop(10);
} else {
gotoAndStop(1);
}
}
Oh yeah should have thought of that, thanks mate, works fine now.
Cheers