Here is what is most probably a dumb question, but my brain has stopped being able to analyze....
Simple function, and then a button that is supposed to call that function. But the function is being called with out the button being clicked.
What is going on?
This always shows the box as visible. If I comment out the button.onRelease...then the box stays false but what is wrong?
I so can't see it.
"Credit belongs to the man who is actually in the arena - T.Roosevelt
Simple function, and then a button that is supposed to call that function. But the function is being called with out the button being clicked.
What is going on?
Code:
mcBox._visible = false;
var btOne:Button
function changeColor(){
if (mcBox._visible == true){
mcBox._visible = false;
}
else {
mcBox._visible = true;
}
}
trace (mcBox._visible);
btOne.onRelease = changeColor();
This always shows the box as visible. If I comment out the button.onRelease...then the box stays false but what is wrong?
I so can't see it.
"Credit belongs to the man who is actually in the arena - T.Roosevelt