PDA

View Full Version : 2 x checkbox donīt work togheter


Rasmus
07-23-2005, 12:56 AM
I have 2 checkboxīex and all i want them to do is to put some value into a string, so i later in the program can recall them and perhaps ad one number to another.

Why canīt i just type :trace(Produkt1002+Produkt1001); and get the correct result, depending what botton is activated?

Please dont give me an great optimized codewhere it all is in one line, 4 now i need to understand this by doing it a unhealthy way ;-)


function checkIt(check1) {
myCheck = check1.getValue();

if (myCheck) {
button1001 = 100;
}
else {
button1001 = 0;

}
}

function checkIt2(check1) {
myCheck = check1.getValue();

if (myCheck) {
button1002 = 101;
}
else {
button1002 = 0;

}trace(button1002+button1001);
}