Apache flex addEventListener不工作flashbuilder 4.5

Apache flex addEventListener不工作flashbuilder 4.5,apache-flex,actionscript,flash-builder,Apache Flex,Actionscript,Flash Builder,我做的每件事都是按部就班的(我想),这个问题我已经复习了好几遍了,但似乎都没法解决。creationCompleteHandler函数是b protected function creationCompleteHandler(event:FlexEvent):void { btnRequest.addEventListener(MouseEvent.CLICK, readData); } protected function readData():void { Alert.s

我做的每件事都是按部就班的(我想),这个问题我已经复习了好几遍了,但似乎都没法解决。creationCompleteHandler函数是b

protected function creationCompleteHandler(event:FlexEvent):void
{
    btnRequest.addEventListener(MouseEvent.CLICK, readData);
}

protected function readData():void 
{
    Alert.show("check check");
}

将事件作为参数添加到侦听器:

protected function readData(event:MouseEvent):void 
{
    Alert.show("check check");
}
或者,最好单击“编写”按钮,单击侦听器并从中调用
readData()