Chinaunix首页 | 论坛 | 博客
  • 博客访问: 25655
  • 博文数量: 18
  • 博客积分: 247
  • 博客等级: 二等列兵
  • 技术积分: 155
  • 用 户 组: 普通用户
  • 注册时间: 2012-12-10 11:28
文章分类

全部博文(18)

文章存档

2012年(18)

我的朋友
最近访客

分类:

2012-12-10 11:35:27

原文地址:flex定时器的基本实现 作者:chendong292


点击(此处)折叠或打开

  1. xmlns:s="library://ns.adobe.com/flex/spark"
  2. xmlns:mx="library://ns.adobe.com/flex/mx"
  3. creationComplete="init()"
  4. minWidth="955" minHeight="600">
  5. import com.common.util.AlertUtil;
  6. import mx.controls.Alert;
  7. private var time:Timer;
  8. private var count:int=0;
  9. protected function init():void
  10. {
  11. time = new Timer(1000);
  12. time.addEventListener(TimerEvent.TIMER,timeHandler);
  13. time.start();
  14. }
  15. public function timeHandler(evt:TimerEvent):void
  16. {
  17. count++;
  18. this.timer.text="第"+count+"次响应";
  19. }
  20. ]]>

阅读(190) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~