开发者

Send data from Flash to php every 3 second [closed]

开发者 https://www.devze.com 2023-04-04 20:05 出处:网络
开发者_运维技巧 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current form.
开发者_运维技巧 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

So, I have learned how to actually send data from Flash, but how do I in ActionScript send data every 3 second?


Use a Timer object that repeats every 3 seconds:

// 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
}

Class doc here: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/utils/Timer.html

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号