scheduleEvent just waits x number of seconds to do something.
PHP Code:
function onCreated() {
this.scheduleEvent(5, "onMyEvent", null); // the last parameter isn't needed on v6 and above, or on serverside
}
function onMyEvent() {
echo("event!");
}
"event!" would be echoed 5 seconds after the script ran.
e: also, MrOmega, you should avoid using variables with the name 'var' as they don't work on clientside (might just be this.var, I don't remember) due to some stupid Flash thing Stefan implemented. Avoiding the use of it altogether is best to avoid confusion.