# Can I get a look at this code?

**URL:** <https://forum.kirupa.com/t/can-i-get-a-look-at-this-code/194863>\
**Category:** flash\
**Created:** [July 26, 2006, 7:25pm UTC](https://forum.kirupa.com/t/can-i-get-a-look-at-this-code/194863 "2006-07-26T19:25:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![garyzero](https://avatars.discourse-cdn.com/v4/letter/g/71c47a/32.png) [@garyzero](https://forum.kirupa.com/u/garyzero)\
**Post date:** [July 26, 2006, 7:25pm UTC](https://forum.kirupa.com/t/can-i-get-a-look-at-this-code/194863/1 "2006-07-26T19:25:57Z")

</div>

I’ve wanted to reuse this for publishing files in version 8 but I can only get it to work in 6 or less in the past. Its a preloader code. Thanks

```auto
onClipEvent (load) {
 // set the status bar width to zero;
 _xscale = 0;
}
onClipEvent (enterFrame) {
 // calculate the load as a percentage;
 counter = math.floor(_parent.getBytesLoaded()/_parent.getBytesTotal()*100);
 _parent.counterpercent = counter+"%";
 // if loaded, play;
 if (counter>=100) {
  _parent.play();
 } else {
  // if not loaded, set the status bar width;
  _xscale = counter;
 }
}

```
