0 Replies Latest reply on Apr 24, 2008 3:10 AM by smonika15

    help in setTimeout function

    smonika15
      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.series;

      for(var i:int = 0; i< selectedDataPoint1[0].selectedIndices.length; i++)
      {
      index=selectedDataPoint1[0].selectedIndices ;
      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