flash AS2.0代码连线题的问题 10

正确答案是但是选择正确了还是弹出错误的对话框左边的命名是:t1,t2,t3,t4,t5右边的命名是:btn1,btn2,btn3,btn4,btn5代码是这样的stop(... 正确答案是

但是选择正确了 还是弹出错误的对话框

左边的命名是:t1,t2,t3,t4,t5

右边的命名是:btn1,btn2,btn3,btn4,btn5

代码是这样的
stop();
var stat_arr:Array = [false, false, false, false, false];
var a = 0;
var b = 0;
var c = 0;
var d = 0;
var e = 0;

var id = 0;

btn_kk._visible = false;

dang._visible = false;
tj_btn._visible = false;
btn1.onRelease = function()
{
with (t2)
{

a = 1;
gotoAndStop(1);
}
if (id == 1)
{
stat_arr[0] = true;
check_zt();
}
with (t3)
{
//b = 0;
gotoAndStop(1);
}
with (t4)
{
//c = 0;
gotoAndStop(1);
}
with (t5)
{
//d = 0;
gotoAndStop(1);
}
with (t1)
{
//d = 0;
gotoAndStop(1);
}

};
btn2.onRelease = function()
{
with (t3)
{
b = 1;
gotoAndStop(1);
}
if (id == 2)
{
stat_arr[1] = true;
check_zt();
}
with (t2)
{
//b = 0;
gotoAndStop(1);
}
with (t4)
{
//c = 0;
gotoAndStop(1);
}
with (t5)
{
//d = 0;
gotoAndStop(1);
}
with (t1)
{
//d = 0;
gotoAndStop(1);
}
};
btn3.onRelease = function()
{

with (t4)
{
c = 1;
gotoAndStop(1);
}
if (id == 3)
{
stat_arr[2] = true;
check_zt();
}
with (t3)
{
//b = 0;
gotoAndStop(1);
}
with (t2)
{
//c = 0;
gotoAndStop(1);
}
with (t5)
{
//d = 0;
gotoAndStop(1);
}
with (t1)
{
//d = 0;
gotoAndStop(1);
}

};
btn4.onRelease = function()
{
with (t5)
{
d = 1;
gotoAndStop(1);
}
if (id == 4)
{
stat_arr[3] = true;
check_zt();
}
with (t3)
{
//b = 0;
gotoAndStop(1);
}
with (t4)
{
//c = 0;
gotoAndStop(1);
}
with (t2)
{
//d = 0;
gotoAndStop(1);
}
with (t1)
{
//d = 0;
gotoAndStop(1);
}

};

btn5.onRelease = function()
{
with (t1)
{
e = 1;
gotoAndStop(1);
}
if (id == 5)
{
stat_arr[4] = true;
check_zt();
}
with (t3)
{
//b = 0;
gotoAndStop(1);
}
with (t4)
{
//c = 0;
gotoAndStop(1);
}
with (t5)
{
//d = 0;
gotoAndStop(1);
}
with (t2)
{
//d = 0;
gotoAndStop(1);
}
};

function check_zt()
{
var try_num:Number = 0;

if (a == 1 && b == 1 && c == 1 && d == 1 && e == 1)
{
btn_kk._visible = true;
btn_ok._visible = false

}
for (var i = 0; i < stat_arr.length; i++)
{
trace(stat_arr[i]);
trace(stat_arr.length);
if (stat_arr[i])
{
try_num++;
}
}

trace(try_num);
if (try_num == stat_arr.length)
{
//this.gotoAndPlay(4207);
dang._visible = true;

}
}
展开
 我来答
qqminiu_880202
2014-01-20
知道答主
回答量:3
采纳率:0%
帮助的人:3773
展开全部
我也遇到了同样的问题……
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
收起 1条折叠回答
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式