开发者

Converting MXML to AS3: AreaSeries Click

开发者 https://www.devze.com 2022-12-12 04:27 出处:网络
- 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\" us

-

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" fu开发者_开发技巧nction. 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


series1.addEventListener(MouseEvent.CLICK, function(event:MouseEvent):void {
    clickResetChart(6);
});
0

精彩评论

暂无评论...
验证码 换一张
取 消