GregD
October 30th, 2002, 10:40 AM
Hey Guys,
Just a quick question... I currently have a button which checks to see if the values of text boxes are correct before displaying a tick or a cross to indicate this.
I want to disable the input text boxes so no data can be written into them once they are correct...
So my code so far within the button:
on (release) {
if (input1 == "140" && input2 == "180" && input3 == "140" && input4 == "180" && input5 == "640") { //if these values are entered in the input boxes <input1> etc.
setProperty(_root.ticka, _visible, true); //tick becomes visible
//code needs to go here for disabling input txt boxes
} else {
setProperty(_root.crossa, _visible, true); // cross becomes visible
}
}
I read up on some sites dedicated to flash/actionscripting but the closest i could find was this for an input text field:
yourTextField.onChanged = function() {
yourTextField.selectable = false;
};
I needed it within the if statement, so i couldnt figure out how it worked.
If anyone can help me on this ill be grateful ;)
Thanks
Just a quick question... I currently have a button which checks to see if the values of text boxes are correct before displaying a tick or a cross to indicate this.
I want to disable the input text boxes so no data can be written into them once they are correct...
So my code so far within the button:
on (release) {
if (input1 == "140" && input2 == "180" && input3 == "140" && input4 == "180" && input5 == "640") { //if these values are entered in the input boxes <input1> etc.
setProperty(_root.ticka, _visible, true); //tick becomes visible
//code needs to go here for disabling input txt boxes
} else {
setProperty(_root.crossa, _visible, true); // cross becomes visible
}
}
I read up on some sites dedicated to flash/actionscripting but the closest i could find was this for an input text field:
yourTextField.onChanged = function() {
yourTextField.selectable = false;
};
I needed it within the if statement, so i couldnt figure out how it worked.
If anyone can help me on this ill be grateful ;)
Thanks