hi, I made a condition that only when you press a certain key + click, a movie clip will play. it worked, but everytime I click on the button, the clip naturally goes to that frame where it says gotoAndPlay, so I decided to add a variable “_root.var_controlpanel = false;”
(goto www.huachingfoundation.com and click on the COYPRIGHT symbol while pressing “z” and “x”)
now this is where I get things messed up. I can make the variable work, but without the keypress combination. I make the keypress combination but without the variable. my question is how do I combine the two to work together? thank you
my algorithm should go like this:
if buttons pressed {
and if variable is false {
showpanel;
set variable to true;
else do nothing
}
}
showpanel_btn.onRelease = function() {
if (Key.isDown(88) & Key.isDown(90)) {
controlpanel_mc.gotoAndPlay(“showpanel”);
}
};
showpanel_btn.onRelease = function() {
if (_root.var_controlpanel == false) {
controlpanel_mc.gotoAndPlay(“showpanel”);
}
_root.var_controlpanel = true;
};