0

Hi I'm trying to pass in a function to change the tool tip for a HSlider in flex 4 but I keep getting the following error no matter how I try defining the function: Error #1006: value is not a function

Here's the code

function positiveNumberTips(value:Number):Number
            {
                return calculations.roundToPrecision((value * -1),2);
            }

            metricSlider.dataTipFormatFunction(positiveNumberTips);

6 MetricSliders, which are HSliders, are created dynamically so that is why I cannot define the dataTipFormatFunction in a declaration as usual.

The positiveNumerTips function is being used by other static sliders and it is working correctly.

Thanks for any help.

4

1 回答 1

2

试试这个:你的语法是错误的。

metricSlider.dataTipFormatFunction=positiveNumberTips;
于 2011-12-09T11:20:52.400 回答