The documentation seems not correct here:

setInterval(objectName:Object, methodName:Function, interval:Number [,
param1:Object, param2, ..., paramN]) : Number 

I thought methodName should be of type string when using an object as
1th parameter.


Greetz Erik

-----Original Message-----
From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of loveewind
Sent: woensdag 25 mei 2005 13:52
To: flexcoders@yahoogroups.com
Subject: [flexcoders] how to use the setInterval() in flex actionscript
?

the code run normally in swf,

ActionScript:
function checkOut()
{
     TextToCheck = spellCheck_txt.text;
     url_string = "javascript:SpellCheck();";
     getURL(url_string, "");
     checkOut_interval = setInterval(function ()
     {
          if (spellResult != undefined)
          {
               spellCheck_txt.text = spellResult;
               clearInterval(checkOut_interval);
          } // end if
     }, 100);
}




and how to use setInterval() in flex actionscript

as referred in flex actionscript reference:

setInterval(functionName:Function, interval:Number [, param1:Object,
param2, ..., paramN]) : Number setInterval(objectName:Object,
methodName:Function, interval:Number [, param1:Object, param2, ...,
paramN]) : Number Parameters functionName A function name or a reference
to an anonymous function.

interval The time in milliseconds between calls to the functionName or
methodName parameter.

param1, param2, ..., paramN Optional parameters passed to the
functionName or methodName parameter.

objectName An object containing the method methodName. You must include
this parameter when using setInterval() in an <mx:Script> block in Flex
applications.



thanks



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to