小编bsb*_*rti的帖子

在休息之前退出开关/案例功能;

当我到达证明任何术语向量answer1不同于任何术语向量rightAnswer1(在条件中:"answer1 [i1]!= rightAnswer1 [i1]")的行时,我需要离开函数开关/ case

switch (currentFrame)
{
    case 1:
        for (var i1:int = 0; i1 < 8; i1++)
        {
            if (answer1[i1] != rightAnswer1[i1])
            {                   
                anyArray[currentFrame - 1] = 2;
                trace("Answer " + i1 + " is wrong!");
                break; // I need to leave the switch/case function here
            }
        }

        trace("Answer is right!");
        anyArray[currentFrame - 1] = 1;

        break;

    case 2:
        for (var i2:int = 0; i2 < 3; i2++)
        {
            if (answer2[i2] != rightAnswer2[i2])
            {                   
                anyArray[currentFrame - 1] = …
Run Code Online (Sandbox Code Playgroud)

flash actionscript-3 switch-statement

1
推荐指数
1
解决办法
847
查看次数

标签 统计

actionscript-3 ×1

flash ×1

switch-statement ×1