# Flv buffer animation

**URL:** <https://forum.kirupa.com/t/flv-buffer-animation/245079>\
**Category:** Uncategorized\
**Created:** [November 26, 2007, 7:11am UTC](https://forum.kirupa.com/t/flv-buffer-animation/245079 "2007-11-26T07:11:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sparkdemon](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@sparkdemon](https://forum.kirupa.com/u/sparkdemon)\
**Post date:** [November 26, 2007, 7:11am UTC](https://forum.kirupa.com/t/flv-buffer-animation/245079/1 "2007-11-26T07:11:51Z")

</div>

respected programmers,

i am trying to make a flv http progressive download mechanism.  
the mechanism involves a preloader to show when the buffer is refilling.

My code is like this:

if(infoObject.code.toString()==‘NetStream.Buffer.Empty’)  
{  
my\_video.\_alpha=30;  
var ldr:MovieClip=\_root.attachMovie(“loader”,“loader”,0);  
ldr.\_x=Stage.width/2;  
ldr.\_y=Stage.height/2;  
}  
if(infoObject.code.toString()==‘NetStream.Buffer.Full’)  
{  
my\_video.\_alpha=100;  
\_root.loader.removeMovieClip();  
}  
if(infoObject.code.toString()==‘NetStream.Buffer.Flush’)  
{  
//stream\_ns.seek(0);  
stream\_ns.play(vidName);  
}

* * *

However i notice that , each time the buffer fills up, the stream starts playing before the loader is removed from screen. I want to to know, why this lag is there.

also how can i solve this problem , so that each time the buffer is full again, the loader should be removed first and then the stream should play.
