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:
Well, I don’t have Flash on that computer, but your best bet is to check the textfield methods in the AS Dictionary. Everything’s there. And if it is not there, it doesn’t exist.
What I usually do is have a mc with 0 alpha away from the stage and then setProperty to move it on to the text field. Make sure that the mc is on top of the text field. This way it blocks the input field and you cannot enter text once u have the correct answer. Hope this helps!
Your movie clip method doesnt work too well because you can still enter text into the input box… unless im doing something wrong, its on the layer above the textbox and i brought it to the front but it still lets me do things to the text box.
Sorry it was my mistake! I forgot to mention that the mc should have a rectangular or square box and then make the mc alpha as 0. The you will block it totally and you can not enter any text into the input box. If its an empty mc with alpha 0 this doesnt work.