MACROMEDIA FLASH MEDIA SERVER 2-CLIENT-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR FLASH MEDIA SERVER 2 Instrukcja Użytkownika Strona 8

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 172
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 7
5
SERVER-SIDE ACTIONSCRIPT LANGUAGE REFERENCE FOR ADOBE MEDIA SERVER 5.0.1
Server-Side ActionScript Language Reference
Last updated 7/2/2013
permanent One of the following values: true, false, or null. Makes a property permanent (nondeletable) if true
or deletable if
false; a null value leaves this attribute unchanged. Any attempt to delete a permanent property (by
calling
deleteobj.prop) is ignored.
Example
The following code prevents the resolve() method from appearing in enumerations:
Object.prototype.__resolve = function(methodName){ ... };
setAttributes(Object.prototype, "__resolve", false, null, null);
The following example creates three constants on a Constants object and makes them permanent and read-only:
Constants.KILO = 1000;
setAttributes(Constants, "KILO", null, true, true);
Constants.MEGA = 1000*Constants.KILO;
setAttributes(Constants, "MEGA", null, true, true);
Constants.GIGA = 1000*Constants.MEGA; setAttributes(Constants, "GIGA", null, true, true);
setInterval()
setInterval(function, interval[, p1, ..., pN])
setInterval(object.method, interval[, p1, ..., pN])
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 routine. The
setInterval() method returns a unique ID that you can pass to the
clearInterval() method to stop the routine.
Note: Standard JavaScript supports an additional usage for the setInterval() method,
setInterval(stringToEvaluate, timeInterval), which is not supported by Server-Side ActionScript.
Availability
Flash Communication Server 1
Parameters
function A Function object.
object.method A method to call on object.
interval A number indicating the time in milliseconds between calls to function.
p1, ..., pN Optional parameters passed to function.
Returns
An integer that provides a unique ID for this call. If the interval is not set, returns -1.
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");
The following example uses a named function,
callback1()
, to send the message
"interval called"
to the server log:
Przeglądanie stron 7
1 2 3 4 5 6 7 8 9 10 11 12 13 ... 171 172

Komentarze do niniejszej Instrukcji

Brak uwag