views:

54

answers:

1

Hello,

I have a line of MXML for an AreaSeries in one of my Flex charts:

<mx:AreaSeries yField="A" displayName="A Model" click="clickResetChart(6)" buttonMode="true" mouseChildren="false" useHandCursor="true"/>

And I need to rewrite it into ActionScript. I have all of it working except for the "click" function. Could anyone tell me how to do it in AS?

var series1:AreaSeries = new AreaSeries();
series1.yField="A";
series1.displayName="A Model";
series1.buttonMode = true;
series1.useHandCursor = true;
series1.click???

series1.click does not exist... so what do I do?

Much appreciated,

-Matt

+3  A: 
series1.addEventListener(MouseEvent.CLICK, function(event:MouseEvent):void {
    clickResetChart(6);
});
Cory Petosky
Thank you! And very prompt as well! :)
mattdell
Always happy to help. Good luck!
Cory Petosky