I am having a problem with buffering. I have my code set up to show a graphical representation of a buffer whenever the buffer is empty and then I have it disapear when the buffer is full. My problem is that half the time my video starts to buffer itself before it becomes empty, or somehow the message is not getting recieved by flash. So what happens is my video simply looks like it stops and then all the sudden re-appears.
My code looks like this:
The video is located at http://www.dttment.com/video/videoplayer.htmCode:// setting the buffering function buffering = function () { buffer._visible = true; buffer.bar._width = (vidStream.bufferLength/vidStream.bufferTime)*294; buffer.BufferText = "Buffering..."; }; // setting the not buffering function notBuffering = function () { buffer._visible = false; buffer.bar._width = 0; }; // buffer.onEnterFrame = function() { vidStream.onStatus = function(infoObject) { if ((infoObject.code == "NetStream.Play.Start" || infoObject.code == "NetStream.Buffer.Empty") || (vidStream.bufferLength<1)) { goBuff = true; } else if (infoObject.code == "NetStream.Buffer.Full") { goBuff = false; } if (endTime<=videoStream.time) { buffer._visible = true; buffer.bar._width = 0; buffer.bufferText = "Video Complete"; } }; if (goBuff) { buffering(); } else if (goBuff == false) { notBuffering(); }
Any help would be greatly appreciated.




Reply With Quote