lovewind
05-25-2005, 10:10 AM
the code run normally in swf,
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
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