I´ve a Init-class that calls a Connection-class wich set up a connection to a streaming server. When recieving “NetConnection.Connect.Success” it calls a Stream-class that creates a stream over the active connection. The problem is that the event listener for the NetStream never seems to execute. Why?
public function Stream(_connection:NetConnection):void
{
stream = new NetStream(_connection);
stream.addEventListener(NetStatusEvent.NET_STATUS, eventHandler);
}
private function eventHandler(event:NetStatusEvent):void
{
trace("Event: "+event.info.code);
}
I traced the result and it seems fine (to me).
NetConnection.Connect.Success
stream: [object NetStream]
_connection: [object NetConnection]