switch case statement
Dear all thank you for your time
I have a function called control I use to reset a game using a set interval clear interval process. I would like to stop the reset function working at certain times to allow another function to execute. I have tried using a switch and else if statements but cant seem get the right result, the console . log does not appear in the console if currentFrame is 0.So the concept is when the movie clip current frame is 9 the control function stops when at 0 the functions are allowed.I find the console only responds to the true function.
function control(){
switch(true)
{
case true:if(this.overided_mc.currentFrame==(9)){
console.log ("overided")
// other movie clips do not act
}
break;
case false :if(this.overided_mc.currentFrame==(0)){
console.log ("not overiden")
//other movie clips react to this order
}
}
}Best Regards Peter
