英语翻译var countertime:Number;var disptext:String;var mycounter:Timer=new Timer(1000);mycounter.addEventListener(TimerEvent.TIMER,jishi);kaishi_btn.addEventListener(MouseEvent.CLICK,kaishi_fun);function kaishi_fun(eve:MouseEvent):void {\x05count
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/28 03:58:04
英语翻译var countertime:Number;var disptext:String;var mycounter:Timer=new Timer(1000);mycounter.addEventListener(TimerEvent.TIMER,jishi);kaishi_btn.addEventListener(MouseEvent.CLICK,kaishi_fun);function kaishi_fun(eve:MouseEvent):void {\x05count
英语翻译
var countertime:Number;
var disptext:String;
var mycounter:Timer=new Timer(1000);
mycounter.addEventListener(TimerEvent.TIMER,jishi);
kaishi_btn.addEventListener(MouseEvent.CLICK,kaishi_fun);
function kaishi_fun(eve:MouseEvent):void {
\x05countertime=Number(input_mc.text)+1;
\x05mycounter.start();
}
function jishi(event:TimerEvent):void {
\x05countertime--;
\x05disp_txt.text=String(countertime);
\x05if (countertime==0) {
\x05\x05mycounter.stop();
\x05\x05disp_txt.text="时间到!"
\x05}
}
英语翻译var countertime:Number;var disptext:String;var mycounter:Timer=new Timer(1000);mycounter.addEventListener(TimerEvent.TIMER,jishi);kaishi_btn.addEventListener(MouseEvent.CLICK,kaishi_fun);function kaishi_fun(eve:MouseEvent):void {\x05count
按下kaishi_btn按钮开始Number(input_mc.text)+1秒的倒计时,disp_txt.text显示时间,时间为0时disp_txt.text变成时间到!