# Flv netstream wait till 30% loaded then play

**URL:** <https://forum.kirupa.com/t/flv-netstream-wait-till-30-loaded-then-play/219237>\
**Category:** Uncategorized\
**Created:** [March 15, 2007, 12:05am UTC](https://forum.kirupa.com/t/flv-netstream-wait-till-30-loaded-then-play/219237 "2007-03-15T00:05:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brndn](https://avatars.discourse-cdn.com/v4/letter/b/dec6dc/32.png) [@brndn](https://forum.kirupa.com/u/brndn)\
**Post date:** [March 15, 2007, 12:05am UTC](https://forum.kirupa.com/t/flv-netstream-wait-till-30-loaded-then-play/219237/1 "2007-03-15T00:05:04Z")

</div>

Hey this is basically how I have created a media window.  
I want the first flv file to load and play. This works fine but What I would like to mash into the equation is a detector for the bytesloaded and if it has loaded say 30% then start playing.  
It is a temporary pause the logic of the function is fine but my methods are not. If you know what i mean.

This is the pob: [COLOR=darkorange]videoLoad\_then\_play();[/COLOR]

```auto
 
var loaderInterval = setInterval(videoLoadStatus,100);
var loaderAmount:Number;
function videoLoadStatus(){
 loaderAmount = net_stream.bytesLoaded / net_stream.bytesTotal;
 loader.loadbar._width = loaderAmount * loadbar_Width;
 loader.scrub._x = net_stream.time / duration * loadbar_Width;
videoLoad_then_play();
}
 
function videoLoad_then_play(){
  if(loader.loadbar._width >= (loadbar_Width/5)){
   net_stream.pause();}
  delete videoLoader_then_play();
  }

```

Is there a beter way to do this. The delete and the interval dont seem to be in patnership.  
:pir:
