Same, just put in a <mx:Script> tag, or link to the external .as file in 
your script tag.

----- Original Message ----- 
From: "loveewind" <[EMAIL PROTECTED]>
To: <flexcoders@yahoogroups.com>
Sent: Wednesday, May 25, 2005 7:51 AM
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







 
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