1
votes

I'm doing everything by the book (I think), I've reviewed this problem multiple times, but I can't seem to get it fixed. The creationCompleteHandler function is b

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

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

1 Answers

3
votes

Add event as argument to your listener:

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

or better write button click listener and call readData() from it.