# Please Help with Preloader

**URL:** <https://forum.kirupa.com/t/please-help-with-preloader/323798>\
**Category:** flash\
**Created:** [July 18, 2011, 10:47pm UTC](https://forum.kirupa.com/t/please-help-with-preloader/323798 "2011-07-18T22:47:00Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nubian](https://avatars.discourse-cdn.com/v4/letter/n/b9bd4f/32.png) [@nubian](https://forum.kirupa.com/u/nubian)\
**Post date:** [July 18, 2011, 10:47pm UTC](https://forum.kirupa.com/t/please-help-with-preloader/323798/1 "2011-07-18T22:47:00Z")

</div>

I pulled this preloaded from [http://help.adobe.com/en\_US/AS2LCR/Flash\_10.0/help.html?content=00000421.html](http://help.adobe.com/en_US/AS2LCR/Flash_10.0/help.html?content=00000421.html).

For some reason it’s not working as I thought it would.  
What’s happening is that while preloading, you can hear the sound but no video.

My video component is named, my\_video.

```auto
var connection_nc:NetConnection = new NetConnection();
connection_nc.connect(null);
var stream_ns:NetStream = new NetStream(connection_nc);
my_video.attachVideo(stream_ns);
stream_ns.play("http://www.helpexamples.com/flash/video/lights_short.flv");

this.createTextField("loaded_txt", this.getNextHighestDepth(), 10, 10, 160, 22);
var loaded_interval:Number = setInterval(checkBytesLoaded, 500, stream_ns);
function checkBytesLoaded(my_ns:NetStream) {
    var pctLoaded:Number = Math.round(my_ns.bytesLoaded / my_ns.bytesTotal * 100);
    loaded_txt.text = Math.round(my_ns.bytesLoaded / 1000) + " of " + Math.round(my_ns.bytesTotal / 1000) + " KB loaded (" + pctLoaded + "%)";
    progressBar_mc.bar_mc._xscale = pctLoaded;
    if (pctLoaded >= 100) {
        clearInterval(loaded_interval);
    }
}

```

Please help

Thank you
