I'm using the following code to reuse a single FLVPlayback component variable. Would anyone know why the NetStream doesn't stop?
public function clearVideoPlayer(newSource:String):void {
if (_videoFLV) {
removeChild(_videoFLV);
_videoFLV.getVideoPlayer(0).close();
_videoFLV = null;
}
_videoFLV = new FLVPlayback();
_videoFLV.autoPlay = false;
_videoFLV.autoRewind = false;
_videoFLV.width = 320;
_videoFLV.height = 240;
_videoFLV.source = newSource;
addChild(_videoFLV);
}
But after running the function several times, accoring to Scout the NetStream
doesn't get closed.
In the Network Events row of the UI I get e.g. 4 x Recieving NetStream audio/video, 5 x Recieving NetStream audio/video, 2 x Recieving NetStream audio/video
This goes on indefinitely, long after the length of any of the videos.
Thanks,
Mark