flash中的if语句有没有语法错误
if(tmp = 2){
maxloop = 34;
slowloop = 2;
}
else if(tmp = 4){
maxloop = 49;
slowloop = 5;
}
else if(tmp = 3){
maxloop = 42;
slowloop = 6;
}
else{
trace("其他50%");
}
参考答案:也许该是
if(tmp == 2)
if(tmp = 2){
maxloop = 34;
slowloop = 2;
}
else if(tmp = 4){
maxloop = 49;
slowloop = 5;
}
else if(tmp = 3){
maxloop = 42;
slowloop = 6;
}
else{
trace("其他50%");
}
参考答案:也许该是
if(tmp == 2)