-
我在我的一个Flex图表中为AreaSeries提供了一行MXML:
<mx:AreaSeries yField="A" displayName="A Model" click="clickResetChart(6)" buttonMode="true" mouseChildren="false" useHandCursor="true"/>
我需要将其重写为ActionScript。除了“点击”功能外,我所有的工作都有效。谁能告诉我如何在AS中做到这一点?
var series1:AreaSeries = new AreaSeries();
series1.yField="A";
series1.displayName="A Model";
series1.buttonMode = true;
series1.useHandCursor = true;
series1.click???
series1.click不存在......所以我该怎么办?
-Matt
答案 0 :(得分:3)
series1.addEventListener(MouseEvent.CLICK, function(event:MouseEvent):void {
clickResetChart(6);
});