0
所以,我已經學會了如何真正從Flash發送數據,但我如何在ActionScript中每3秒發送一次數據?每3秒發送一次數據從Flash到php
所以,我已經學會了如何真正從Flash發送數據,但我如何在ActionScript中每3秒發送一次數據?每3秒發送一次數據從Flash到php
使用Timer
對象重複每3秒:
// 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
我一直在尋找,謝謝:) – John
*咳嗽* clickthetick *咳嗽* :) – divillysausages