Тема: Бот для FMS2
Показать сообщение отдельно
Старый 28.02.2008, 08:02
terbooter вне форума Посмотреть профиль Отправить личное сообщение для terbooter Найти все сообщения от terbooter
  № 5  
Ответить с цитированием
terbooter

Регистрация: Oct 2006
Адрес: Novosibirsk-Kaliningrad
Сообщений: 1,278
Отправить сообщение для terbooter с помощью ICQ Отправить сообщение для terbooter с помощью Skype™
Сет интервал чуть ли не единственная глобальная функция в SSAS.
И если бы еще и она не работала, то это было бы слишком
Код:
application.onAppStart = function(){
    trace("App Started");
    trace("Trace works!!!")
    
    setInterval(interv,1000);
    
    function interv(){
        trace("Interval");
    }
}

application.onConnect = function(client){
    
    application.acceptConnection(client);
    
    client.ServerFunction=function(ba){
        trace("ServerFunction"+ba+ba.length)
    //    trace(ba.uncompress());
        return ba;
    }
}
Встречный вопрос, а вы хоть одну доку по FMS читали?
Я пологаю что нет, тк этот метод изначальный с первой версии сервера
(даже точнее - это метод JavaScript на базе которого сделан SSAS)
Вот из PDF-справки FMS2

Цитата:
setInterval()
Availability
Flash Communication Server MX 1.0.
Usage
setInterval(function, interval[, p1, ..., pN])
setInterval(object, methodName, interval[, p1, ..., pN])
Parameters
function The name of a defined ActionScript function or a reference to an anonymous
function.
object An object derived from the ActionScript Object object.
methodName The name of the method to call on object.
interval The time (interval) between calls to function, in milliseconds.
p1, ..., pN Optional parameters passed to function.
Returns
A unique ID for this call. If the interval is not set, the method returns -1.
Description
Method (global); continually calls a function or method at a specified time interval until the
clearInterval() method is called. This method allows a server-side script to run a generic
routine. The setInterval method returns a unique ID that you can pass to the
clearInterval() method to stop the routine.


Последний раз редактировалось terbooter; 28.02.2008 в 08:06.