Thread: scheduleevent
View Single Post
  #2  
Old 10-03-2010, 08:26 AM
MrOmega MrOmega is offline
One More Time
MrOmega's Avatar
Join Date: Aug 2010
Location: TN, USA
Posts: 631
MrOmega is an unknown quantity at this point
Send a message via AIM to MrOmega Send a message via MSN to MrOmega Send a message via Yahoo to MrOmega
Sure

PHP Code:
function onCreated()
{

  
this.var = "foo";
  
scheduleEvent3"change""bar");
  
onTimeout();

}

function 
onTimeout()
{

  
this.chat this.foo;

  
setTimer0.05);

}

function 
onChangetemp.var)
{

  
this.foo temp.var;

  if ( 
temp.var == "bar")
    
scheduleEvent3"change""baz");


When created it will show 'foo' for three seconds then 'bar', then after another three seconds 'baz'. ScheduleEvent does not interupt the current script, which can come in very handy when using a timeout loop.
__________________
Time is the fire in which we burn...
Up, Up, Down, Down, Left, Right, Left, Right, B, A, Select, Start! Now I got 99 LIVES!!!
Reply With Quote