I've created a custom class to handle method calls from the server and I get this error
Error #2044: Unhandled AsyncErrorEvent:. text=Error #2095: flash.net.NetConnection was unable to invoke callback close. error=ReferenceError: Error #1069: Property close not found on MyClient and there is no default value.
code from function that does the connection:
myClient = new MyClient();
myClient.addEventListener(HearEvent.HEARD_SOMETHING,onHear);
nc = new NetConnection();
nc.addEventListener(NetStatusEvent.NET_STATUS, ncOnStatus);
nc.client = dasClient;
nc.connect(connectStr.text, p1.text, p2.text, int(p3.text), p4.text);
that's the MyClient class
public class MyClient extends EventDispatcher
{
public function hear(s:String):void
{
trace(s);
dispatchEvent(new HearEvent(s, HearEvent.HEARD_SOMETHING));
}
}