# AS Preloader Problem?

**URL:** <https://forum.kirupa.com/t/as-preloader-problem/106304>\
**Category:** Uncategorized\
**Created:** [April 4, 2004, 2:35pm UTC](https://forum.kirupa.com/t/as-preloader-problem/106304 "2004-04-04T14:35:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maxtr0sity](https://avatars.discourse-cdn.com/v4/letter/m/a88e57/32.png) [@Maxtr0sity](https://forum.kirupa.com/u/Maxtr0sity)\
**Post date:** [April 4, 2004, 2:35pm UTC](https://forum.kirupa.com/t/as-preloader-problem/106304/1 "2004-04-04T14:35:34Z")

</div>

Ok, I’m once again stepping into Flash again after almost a year of inactivity.

An hour in, I get a big problem. My export file is over 100kb so I wanted a preloader. Now I stole the preloader code from one of my older stuff.

```php

 stop();
 onEnterFrame = function () {
  bytes_loaded = Math.round(this.getBytesLoaded());
  bytes_total = Math.round(this.getBytesTotal());
  getPercent = bytes_loaded/bytes_total;
  this.loadBar._width = getPercent*100;
 }
  if (bytes_loaded == bytes_total) {
   gotoAndPlay("Scene 2", 1);
 };
 

```

Now, I really have no idea if any of this changed in AS2 or not, but even as I export in AS1, it still messes up. Here’s what happens. The current test I put my main movie on Scene 2 frame 1. That scene has one keyframe with lots of MC’s on it. If I individually test that scene only, all the animations work. If I add the preloader in the first scene, it goes to the second scene but immediately goes to the end of all the MC’s showing the result.

Ⓜ
