【问题标题】:Send data from Flash to php every 3 second [closed]每 3 秒将数据从 Flash 发送到 php [关闭]
【发布时间】:2011-11-16 10:12:33
【问题描述】:

所以,我已经学会了如何实际从 Flash 发送数据,但是如何在 ActionScript 中每 3 秒发送一次数据?

【问题讨论】:

    标签: php mysql flash actionscript send


    【解决方案1】:

    使用每 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

    【讨论】:

    • 我在找什么,谢谢 :)
    • 咳嗽clickthetick咳嗽 :)
    猜你喜欢
    • 2013-09-19
    • 2022-08-19
    • 1970-01-01
    • 2014-04-27
    • 2018-08-30
    • 1970-01-01
    • 2013-10-06
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多