PDA

View Full Version : Static text and onClipEvent(enterFrame)


ComCool
03-17-2005, 07:26 PM
Ok, I have like 3 text fields. Input text A and B, and a static text C.
Now let say when I push a button it does a A + B and shows it in C. Now that no problem, here comes the question.

How can a make the result show in C without having to use/puch a button. Like the result shows up when A and B is not Null anymore? I tried with onClipEvent(enterFrame) but it seems to have no effect. :|

deadbeat
03-17-2005, 07:42 PM
You can use TextField.onChanged handlers to update C whenever A or B change...

K.

ComCool
03-17-2005, 08:49 PM
Cool, that seems to work :D

now, mabye you can helt me out with another thing. Let say i have 2 sets of "forms" that are the same. They are then called A1, B1, C1 - A2, B2, C2 etc.

why does this not print a output in my static text C, when a click the button? It gives the right output if i do a trace? :|


on (release) {

var myVar:Number = 1;
do {
A = "A" + myVar;
B = "B" + myVar;
C = "C" + myVar;

C = (A + B);

myVar++;
} while (myVar<3);
}