# Loader.loadBytes crash!

**URL:** <https://forum.kirupa.com/t/loader-loadbytes-crash/206768>\
**Category:** Uncategorized\
**Created:** [November 11, 2006, 4:25am UTC](https://forum.kirupa.com/t/loader-loadbytes-crash/206768 "2006-11-11T04:25:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kiosk77](https://avatars.discourse-cdn.com/v4/letter/k/8c91f0/32.png) [@kiosk77](https://forum.kirupa.com/u/kiosk77)\
**Post date:** [November 11, 2006, 4:25am UTC](https://forum.kirupa.com/t/loader-loadbytes-crash/206768/1 "2006-11-11T04:25:23Z")

</div>

Anybody know how to progressively load and display a SWF file using the flash.net.URLStream and flash.display.Loader classes?

if I write the bytes to the Loader class while the SWF is loading, it crashes flash.

```auto

stream.readBytes(bytes, bytes.[COLOR=#000087]length[/COLOR]);
[COLOR=#000087]if[/COLOR](bytes.[COLOR=#000087]length[/COLOR] > 0) {
        loader.loadBytes(bytes);
}

```

but if wait until the whole thing is loaded and then write the bytes, then it is Totally OK. Any ideas of how to get the SWF to progressive load using flash.display.Loader?

Thank you.
