# Trying To Fix The Simplest Preloader

**URL:** https://forum.kirupa.com/t/trying-to-fix-the-simplest-preloader/316031
**Category:** flash
**Created:** [November 10, 2010, 6:43pm UTC](https://forum.kirupa.com/t/trying-to-fix-the-simplest-preloader/316031 "2010-11-10T18:43:28Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Thrillhou](https://avatars.discourse-cdn.com/v4/letter/t/b4bc9f/32.png) [@Thrillhou](https://forum.kirupa.com/u/Thrillhou)
#### Post date: [November 10, 2010, 6:43pm UTC](https://forum.kirupa.com/t/trying-to-fix-the-simplest-preloader/316031/1 "2010-11-10T18:43:28Z")

</div>

I simply want something that checks to see if the entire swf is loaded, then gotoAndPlay frame two.

I built a movie clip loader that pulls four swfs in a slideshow, but I need each clip to load completely before playing.

I’ve put a loading frame on the swfs, and I’m trying to make it work. So far I have:

stop();  
this.onEnterFrame = function() {  
if(this.getBytesLoaded()==this.getBytesTotal()) {  
gotoAndPlay(2);  
delete this.onEnterFrame;  
}  
}
