SoundMixer.stopAll(); Affecting NetStream event.info.code - Bug?
I'm loading and progressively streaming an F4V Video using pure actionscript code (No playback component used) and after the video begins streaming I place a MUTE button on the stage that when clicked executes the SoundMixer.stopAll(); instruction.
When the movie completes playing I use the following code to monitor the NetStream state changes and place a NEXT button on the stage when the video finishes.
When the video completes there is a NetStream event.info.code issued - "NetStream.Play.Stop"
This is detected by the following
switch (event.info.code) {
case "NetConnection.Connect.Success":
connectStream();
break;
case "NetStream.Play.StreamNotFound":
myTextBox1.text="Unable to locate video: " + videoURL;
break;
case "NetStream.Play.Stop":
trace ("Play stop mode reached");
showRedButton();
break;
}
The problem is that when the SoundMixer.stopAll(); instruction is issued, Netstream no longer issues the "NetStream.Play.Stop" event state so my NEXT button (showRedButton(); instruction) fails to load if the user clicks the MUTE button.
The only way I seem to be able to solve this is by adding the following code to my switch statement since NetStream is still issuing a Buffer.Flush message about 10 times as the video is ending. To prevent the NEXT Button from appearing too early I track the number of times the Buffer.Flush message is issued:
case "NetStream.Buffer.Flush":
++flushCount;
if(flushCount>7 && buttonOn==0)
{
showRedButton();
buttonOn=1;
}
break;
Has anyone else found this to be an issue or a known bug?