# Flash8 Help Needed: Preloader broken. :(

**URL:** <https://forum.kirupa.com/t/flash8-help-needed-preloader-broken/304403>\
**Category:** flash\
**Created:** [February 7, 2010, 12:23pm UTC](https://forum.kirupa.com/t/flash8-help-needed-preloader-broken/304403 "2010-02-07T12:23:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![themop](https://avatars.discourse-cdn.com/v4/letter/t/90ced4/32.png) [@themop](https://forum.kirupa.com/u/themop)\
**Post date:** [February 7, 2010, 12:23pm UTC](https://forum.kirupa.com/t/flash8-help-needed-preloader-broken/304403/1 "2010-02-07T12:23:55Z")

</div>

OK In a previous game on the same AS (2), I made a preloader, the code worked fine, all of the code was isolated on one frame so on another game I copied the frame and pasted into my other game. but the only difference is that one of my games is using flash player 8 (working preloader) and the other is using flash player 6 (not working.) Im using the same code.  
here is the frame code (all of it on frame)

```auto

var loadingCall:Number = setInterval(preloadSite, 50);
function preloadSite():Void {
    var siteLoaded:Number = _root.getBytesLoaded();
    var siteTotal:Number = _root.getBytesTotal();
    _root.percentage = Math.round(siteLoaded/siteTotal*100);
    percentDisplay = _root.percentage+"%";
    bytesDisplay.text = "loaded "+siteLoaded+" of "+siteTotal+" bytes";
    if (siteLoaded>=siteTotal) {
        clearInterval(loadingCall);
    }
    trace (_root.percentage + " percent")
    if (_root.percentage >= 100) {
                trace("percentage = 100")
    }
}

```

I get the output error of this when played :

```auto
**Error** Scene=Scene 1, layer=preloader, frame=1:Line 4: '{' expected
     function preloadSite():Void {

**Error** Scene=Scene 1, layer=preloader, frame=1:Line 17: Unexpected '}' encountered
     }

Total ActionScript Errors: 2 Reported Errors: 2

```

Thanks in advance.
