1 person found this helpful
The NetLoader constructor can use an optional NetConnectionFactoryBase instance, which you probably need to provide.
Extend the NetConnectionFactory and override:
protected function createNetConnection():NetConnection
return new NetConnection();
thx for your help!
I also found that post. I think that will solve my problems for now.
just to get it right: there is no way to listen for NetConnection or NetStream events
beside providing my own NetConnection?
You can register NetStream or NetConnection events in your custom NetLoader too:
override protected function createNetStreamSwitchManager(connection:NetConnection, netStream:NetStream, dsResource:DynamicStreamingResource):NetStreamSwitchManagerBase
But, i think that at this point the connection is already established. Let me know if this is wrong and if overriding this method is a better alternative for you.
You are right, NetConnection is already established at that point!
I'll let you know when i find another solution!
just want to let you know that i found a solition for my problem.
The main problem was that i needed the NetConnection status event "NetConnection.Connect.Success".
All NetStatus Events of the NetConnection in the NetNedotiator class (onNetStatus).
All errors events are received by MediaErrorEvent.MEDIA_ERROR and can be identified by event.error.detail.
What a shame the a Connect.Succes is not an Error
So instead of trying to listen for the event, i just for the next action which would be createNetStream which i can
override in my custom Netloader class and dispatch a event for Connect.Success
I hope this will be helpful for somebody (and that he or she will understand my lousy english)