Avatar

Level 4
The null pointer exception is because ChannelSet has not been
initialized by the RemoteObject yet when you try to add a listener
to it. One workaround is that you can manually create your own
ChannelSet and assign it to the RemoteObject, and then add the
listener to the ChannelSet. Something like:



var cs:ChannelSet = new ChannelSet();

cs.addChannel(new RTMPChannel(null, "
http://localhost:2400"));

flexComRO.channelSet = cs;



I just used RTMPChannel with a random url as an example but
you'll use whatever Channel you have with the right url.