I guess the title is self explain...
server side setTimeout
server side setTimeout
me again 
I guess the title is self explain...
I guess the title is self explain...
setTimeout()
Here's an example.
This is the setTimeout implementation: just copy the code below in your extension or make it an external .as file and import it using #include
Here's a simple example of usage:
hope it helps 
Here's an example.
This is the setTimeout implementation: just copy the code below in your extension or make it an external .as file and import it using #include
Code: Select all
function setTimeout(scope, fn, delay, params)
{
var args = []
for (var i = 3; i < arguments.length; i++)
args.push(arguments[i])
var timer = new Packages.java.util.Timer()
var task = new Packages.java.util.TimerTask()
{
run:function()
{
fn.apply(scope, args)
}
}
timer.schedule(task, delay)
}Code: Select all
function delayedFunction(s,n,b)
{
trace("I was called with the following arguments:")
trace("String : " + s)
trace("Number : " + n)
trace("Boolean: " + b)
}
setTimeout(this, delayedFunction, 1000, "Hello world!", 123456, true)
-
jflowers45
- Posts: 63
- Joined: 11 Jul 2006, 20:52