views:

254

answers:

2

I'm using a progress bar to let a user know how much more live streaming video data is to be buffered before it starts playing. Have that much working fine.

Problem is, if the buffer gets used up, and I need to rebuffer, I can't seem to get the progress bar reset and visible again. Seems once it hits 100% on app start up it can't be reused. What am I missing here?

I'm catching the proper NetStream.netStatus events. The hook for the empty buffer is there and is executing. I'm just not seeing how I might redisplay and start a fresh bar there?

I've tried bar.visible = true and nothing appears. Also tried making a new one and setting visible each time the buffer is empty but no dice. Seems to just be ignored.

A: 

No, destroying the old one and making a new one with the same id.

That seems to be kind of working, but I'm not really sure what the best practice is here. Should I be making new ones each time I need to display one? Isn't there a way to simply recall the old one to the screen and reset it's progress to zero?

Robert
A: 

you can force the progress bar to reset "pBar.setProgress(0,100);", that will set it back to 0. just manually do that when you know that you have to rebuffer.

Curtis Dodd