Ask a Question related to Macromedia Flex General Discussion, Design and Development.
-
smonika15 #1
help in setTimeout function
I want to pass the argument in the function called in setTimeout function.
Below is the code snippet.
public function histogramDataPointClick(dataPointObj:Event):void
{
var duration:Number = 5000;
setTimeout(executeEvent(dataPointObj),duration);
}
public function executeEvent(dataPointObj:Event ):void
{
var index:int;
var message:String;
message="";
selectedDataPoint1=dataPointObject.currentTarget.s eries;
for(var i:int = 0; i<
selectedDataPoint1[0].selectedIndices.length; i++)
{
index=selectedDataPoint1[0].selectedIndices[i];
message = message+"
"+protocolTrendData[index].valueOf().trialPhase;
}
Alert.show("Selected Trial Phase"+message);
dispatchEvent(new Event("histogramDataPointClick"));
}
If I am trying to do that then I am facing error 1067:Implicit coercion of a
value of type void to an unrelated type Function.
error 1067
can anybody help me in that?
Thanks
smonika15 Guest
-
setTimeOut
How do I use setTimeOut to open one html file, keep it open for 15 seconds, close it and then open a second html page? All your help is... -
note 33714 added to function.register-tick-function
please can anyone help me to discover if this function can be used to make a chat ---- Manual Page --... -
Reduce SetTimeout value on dhtml popup menus
See the technote, "How to set the length of time a Pop-up Menu remains visible" at... -
Reducing the setTimeout value of dhtml popup menus
Does anyone here know how/where to reduce the SetTimeout value in the fireworks-generated javascript code (client-side or server-side) for dhtml... -
note 33132 deleted from function.register-shutdown-function by sniper
Note Submitter: markus@malkusch.de ---- I can't agree with nick at nickjoyce dot com. I use php 4.2.3 on linux and my shutdown function is... -
smonika15 #2
help in setTimeout function
I want to pass the argument in the function called in setTimeout function.
Below is the code snippet.
public function histogramDataPointClick(dataPointObj:Event):void
{
var duration:Number = 5000;
setTimeout(executeEvent(dataPointObj),duration);
}
public function executeEvent(dataPointObj:Event ):void
{
var index:int;
var message:String;
message="";
selectedDataPoint1=dataPointObject.currentTarget.s eries;
for(var i:int = 0; i<
selectedDataPoint1[0].selectedIndices.length; i++)
{
index=selectedDataPoint1[0].selectedIndices[i];
message = message+"
"+protocolTrendData[index].valueOf().trialPhase;
}
Alert.show("Selected Trial Phase"+message);
dispatchEvent(new Event("histogramDataPointClick"));
}
If I am trying to do that then I am facing error 1067:Implicit coercion of a
value of type void to an unrelated type Function.
error 1067
can anybody help me in that?
Thanks
smonika15 Guest
-
atta707 #3
Re: help in setTimeout function
try:
setTimeout(executeEvent, duration, dataPointObject);
setTimeout () function
public function setTimeout(closure:Function, delay:Number, ... arguments):uint
Runs a specified function after a specified delay (in milliseconds).
Instead of using this method, consider creating a Timer object, with the
specified interval, using 1 as the repeatCount parameter (which sets the timer
to run only once).
If you intend to use the clearTimeout() method to cancel the setTimeout()
call, be sure to assign the setTimeout() call to a variable (which the
clearTimeout() method will later reference)
Parameters closure:Function ? The name of the function to execute. Do not
include quotation marks or parentheses, and do not specify parameters of the
function to call. For example, use functionName, not functionName() or
functionName(param).
delay:Number ? The delay, in milliseconds, until the function is executed.
... arguments ? An optional list of arguments that are passed to the closure
function.
atta707 Guest



Reply With Quote

