# Preloader in AS3 (how the hell do i do it)

**URL:** <https://forum.kirupa.com/t/preloader-in-as3-how-the-hell-do-i-do-it/230040>\
**Category:** flash\
**Created:** [June 22, 2007, 5:34am UTC](https://forum.kirupa.com/t/preloader-in-as3-how-the-hell-do-i-do-it/230040 "2007-06-22T05:34:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![lambros](https://avatars.discourse-cdn.com/v4/letter/l/eb9ed0/32.png) [@lambros](https://forum.kirupa.com/u/lambros)\
**Post date:** [June 22, 2007, 5:34am UTC](https://forum.kirupa.com/t/preloader-in-as3-how-the-hell-do-i-do-it/230040/1 "2007-06-22T05:34:58Z")

</div>

hey guys,  
i searched almost any topic and didn’t found a tutorial about preloaders in AS3.can anyone tell me how to mak a preloader in AS3 ??? i have th movie clip and the scenes…i just need the actionscript i am gonna put in the preloader’s scene so to move to the next scene when the total bytes downloaded are equal the total.

this is the code i use in AS2!

> 

stop();

var yChange = 65;  
var yStart = 329;

myInterval = setInterval(preload,100);

function preload() {  
var current = \_root.getBytesLoaded();  
var total = \_root.getBytesTotal();  
var pctLoaded = Math.round(current/total_100);  
mask\_mc.\_y = yStart - yChange/100_pctLoaded;

```
if (current &gt;= total) {
	gotoAndStop("main",1);
	clearInterval(myInterval);
}

```

}

this is for the main movie of my project. also i want to know how to preload external swfs with another preloader movieclip…please anyone gimme details or a linki to another tutorial…

thanks:goatee: :goatee: :ponder: :ponder: :ponder: :ponder: :ponder:
