Setinterval() - MACROMEDIA FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE Reference

Server-side actionscript language reference
Table of Contents

Advertisement

setInterval()

Availability
Flash Communication Server MX 1.0.
Usage
setInterval(function, interval[, p1, ..., pN])
setInterval(object, methodName, interval[, p1, ..., pN])
Parameters
The name of a defined ActionScript function or a reference to an anonymous
function
function.
An object derived from the ActionScript Object object.
object
The name of the method to call on
methodName
The time (interval) between calls to
interval
Optional parameters passed to
p1, ..., pN
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
method is called. This method allows a server-side script to run a generic
clearInterval()
routine. The
setInterval
method to stop the routine.
clearInterval()
Standard JavaScript supports an additional usage for the
setInterval(stringToEvaluate, timeInterval)
ActionScript.
Example
The following example uses an anonymous function to send the message "interval called" to
the server log every second:
setInterval(function(){trace("interval called");}, 1000);
The following example also uses an anonymous function to send the message "interval called"
to the server log every second, but it passes the message to the function as a parameter:
setInterval(function(s){trace(s);}, 1000, "interval called");
function
method returns a unique ID that you can pass to the
.
object
, in milliseconds.
function
.
setInterval()
, which is not supported by server-side
method,
setInterval()
115

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MEDIA SERVER 2-SERVER-SIDE ACTIONSCRIPT LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash media server 2

Table of Contents