# Connecting Preloader

**URL:** https://forum.kirupa.com/t/connecting-preloader/256066
**Category:** flash
**Created:** [March 30, 2008, 6:27am UTC](https://forum.kirupa.com/t/connecting-preloader/256066 "2008-03-30T06:27:18Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![kjgator](https://avatars.discourse-cdn.com/v4/letter/k/f0a364/32.png) [@kjgator](https://forum.kirupa.com/u/kjgator)
#### Post date: [March 30, 2008, 6:27am UTC](https://forum.kirupa.com/t/connecting-preloader/256066/1 "2008-03-30T06:27:18Z")

</div>

Hello Everyone,

I have created a preloader, and I want to tell the action script of the preloader once the file is done loading, put it away and load a new movie, or even a new flash file if i have to.

Help? I just want to know the easiest way to set this up. here is the action script i have on the loader right now. Its just numbers counting from 1-100% and a .gif clip that plays but they are not connected in any way.

bytes\_loaded = Math.round(\_root.getBytesLoaded());  
bytes\_total = Math.round(\_root.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
\_root.loadBar.\_width = getPercent_100;  
\_root.loadText = Math.round(getPercent_100)+"%";  
if (bytes\_loaded == bytes\_total) {  
\_root.gotoAndStop(3);  
}

Also, my preloader ends on Frame 3 and movie would start on frame 4.

* * *

kjgator
