When you say "buffer", do you mean the download progress of a progressive video file (e.g. the red scrub track in the YouTube player), or the ability to control the size of the buffered data (i.e. NetStream.bufferTime)? For the former, you can use MediaPlayer.bytesLoaded/bytesTotal and the corresponding change events to build your UI. For the latter, you can use MediaPlayer.bufferTime/bufferLength and the corresponding change events. Feel free to follow up with more specific questions.
Yeah, both items. As for the download progress, what change events would I listen for? Also, I trace out the MediaPlayer.bytesLoaded, MediaPlayer.bytesTotal and both are returning 0. That can't be right?
Scratch my question about MediaPlayer.bytesLoaded, MediaPlayer.bytesTotal. I didn't realize I was using a streaming video when I needed a progressive video for those values to take proper effect. So, I understand how the progressive download progress works. Although, I have my download indicator updating on CURRENT_TIME_CHANGE, which, I'm sure is prolly not the best listener to update the buffer on. What listener should I attach to the progressive download function?
As for streaming videos, I understand your comments about MediaPlayer.bufferTime / MediaPlayer.bufferLength but again, what listener should be attached to the function? Also, I don't grasp how to apply this particular bit of code to the UI. Any suggestions would be great! Thanks again Brian.
For the progressive download case, you can listen for LoadEvent.BYTES_LOADED_CHANGE on the MediaPlayer.
For the buffer, typically you don't represent these properties in the UI (since they're typically not relevant to the user experience, whereas the download status is). The exception being that you might want to show a "Buffering" indicator when the content is being buffered, so that the user understands why playback has temporarily halted. For that case, you can listen for BufferEvent.BUFFERING_CHANGE, or to MediaPlayerStateChangeEvent.MEDIA_PLAYER_STATE_CHANGE (which represents the overall state of the MediaPlayer).