作者jeaby (hello, ActionScript)
看板Flash
标题Re: [问题] 如何设时间到换下一个指定场景?
时间Tue Jul 10 11:56:49 2012
※ 发信站: 批踢踢实业坊(ptt.cc)
: ◆ From: 114.46.162.60
: 推 jeaby:换场景的语法是 gotoAndStop(frame, scene); 07/10 10:16
: → Tiphareth:你好 已经更改好了 但是还是无法显示出结果 07/10 10:43
: 推 jeaby:是加在updateTime这个function内吗? 07/10 11:12
: → Tiphareth:不是耶~有尝试设过会冒出有函数定义重覆的讯息 07/10 11:20
加在原本的 updateTime 内就可以了喔
function updateTime(e:TimerEvent):void
{
timeNum--;
txt_Time.text = timeNum.toString();
if (timeNum == 0)
{
/*
这边需要移除一些事件
ex:
两个timer事件
滑鼠事件
...
*/
if (scoreNum >= 100){
gotoAndStop(1, "s3");
} else {
gotoAndStop(1, "s4");
}
}
}
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 122.121.202.40