Einzelnen Beitrag anzeigen
Alt 25-02-2003, 20:20   #14 (permalink)
bokel
helpQLODhelp
 
Benutzerbild von bokel
 
Registriert seit: Feb 2002
Ort: Köln
Beiträge: 8.505
Hier noch ein Schnipsel aus der 4-Gewinnt-Engine

ActionScript:
  1. Function.prototype.executeLater = function(timeToWait, obj, paramArray) {
  2.     var func = this;
  3.     var intervalId = setInterval(function (obj) {
  4.         func.apply(obj, paramArray);
  5.         clearInterval(intervalId);
  6.     }, timeToWait, obj);
  7. };

Damit kann man eine Funktion einfach später
ausführen lassen.

ActionScript:
  1. function test(){
  2.       trace("test " + arguments);
  3. }
  4.  
  5. test.executeLater(1000, this, "bokel", "was", "here");

mfg r .
bokel ist offline   Mit Zitat antworten