Search code examples
actionscript-3videoloaddurationnetstream

How to make the video play only when netstream is done loading


I noticed that the play() function of netstream is a mix of loading and playing. But I just want to load it,not to play it.What can I do?

I have tried setting the buffertime same as the duration of the video. It didn't work out well...


Solution

  • Check whether the bytes loaded equals bytes total repeatedly. If they equal, remove the listener/stop the interval and play the video.