【发布时间】:2011-11-16 10:12:33
【问题描述】:
所以,我已经学会了如何实际从 Flash 发送数据,但是如何在 ActionScript 中每 3 秒发送一次数据?
【问题讨论】:
标签: php mysql flash actionscript send
所以,我已经学会了如何实际从 Flash 发送数据,但是如何在 ActionScript 中每 3 秒发送一次数据?
【问题讨论】:
标签: php mysql flash actionscript send
使用每 3 秒重复一次的 Timer 对象:
// 3000 is 3 seconds in milliseconds, 0 means the timer
// will repeat until the end of time
var myTimer:Timer = new Timer( 3000, 0 );
myTimer.addEventListener( TimerEvent.TIMER, this._onTimer );
myTimer.start();
private function _onTimer( e:TimerEvent ):void
{
// call your php function here
}
课堂文档:http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/Timer.html
【讨论】: