请问一下,在flex程序设计中,怎么实现数字跳变
展开全部
<?xml version = "1.0" encoding = "utf-8"?> <mx:Application xmlns:mx = " http://www.adobe.com/2006/mxml" layout="vertical"> <mx:Script> <![CDATA[ private var timer : Timer = new Timer(1000, 100); private function btnClick() : void { if (timer.running != true) { timer.addEventListener(TimerEvent.TIMER, test); timer.start(); } } private function test(event : Event) : void { txtShow.text = timer.currentCount.toString(); } ]]> </mx:Script> <mx:HBox horizontalAlign="center" width="100%"> <mx:Button label = "click" click = "btnClick()" /> <mx:TextInput id = "txtShow" /> </mx:HBox> </mx:Application> 我自已写的。运行过,OK
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询