设为首页 加入收藏 网站搜索 繁體中文 中国建站网 — 站长资源分享平台

计时效果(正,倒)

来源:136z.Com 作者:佚名 时间:2005-06-27 00:06:35

点击浏览该文件


本来想写个教程的,有些懒惰,也比较忙,所以就不写了!把源码提供给大家,看不明白的话就跟帖子问下:
主要代码:onClipEvent(load){
OK1=false;
OK2=false;
}
onClipEvent(enterFrame){
if(OK1){//倒数计时;
a=getTimer()-_root.time1;
totaltime=_root.min*60*1000+_root.sec*1000;
nowtime=totaltime-a;
this.txt_m=int(int(nowtime/1000)/60);
this.txt_s=((int(nowtime/1000))-(int(int(nowtime/1000)/60))*60);
this.txt_mm=int((nowtime-this.txt_m*60*1000-this.txt_s*1000)/10);
if((this.txt_m==0)&&(this.txt_s==0)&&(this.txt_mm==0)){
_root.warning="timeout!"
this.OK1=false;
}
}
if(OK2){//正数计时;
b=getTimer()-_root.time1;
this.txt_m=int(int(b/1000)/60);
this.txt_s=((int(b/1000))-(int(int(b/1000)/60))*60);
this.txt_mm=int((b-this.txt_m*60*1000-this.txt_s*1000)/10);
if((this.txt_m==_root.min)&&(this.txt_s==_root.sec)){
_root.warning="timeout!"
this.OK2=false;
}
}
}

用按钮控制ok1 ,ok2的值  实现正数与倒数计时;
FLA:
点击浏览该文件

Tags:

  • 好的评价 如果您觉得好,就请您
      0%(0)
  • 差的评价 如果您觉得差,就请您
      0%(0)
  • 相关文章
    广告赞助

    文章随便看看 设计素材 建站学院 网页模板 视频教程

    网友评论

    共有 0 位网友发表了评论,得分 0 分,平均 0 分    查看完整评论

    用户名: 查看更多评论

    分 值:100分 85分 70分 55分 40分 25分 10分 1分

    内 容:

             通知管理员 验证码: