# Adding a preloader to a Kirupa tutorial

**URL:** <https://forum.kirupa.com/t/adding-a-preloader-to-a-kirupa-tutorial/192942>\
**Category:** flash\
**Created:** [July 3, 2006, 2:11am UTC](https://forum.kirupa.com/t/adding-a-preloader-to-a-kirupa-tutorial/192942 "2006-07-03T02:11:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dunkley](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/dunkley/32/2541_2.png) [@dunkley](https://forum.kirupa.com/u/dunkley)\
**Post date:** [July 3, 2006, 2:11am UTC](https://forum.kirupa.com/t/adding-a-preloader-to-a-kirupa-tutorial/192942/1 "2006-07-03T02:11:42Z")

</div>

I have followed this tutorial [http://www.kirupa.com/developer/mx/preloader\_transition.htm](http://www.kirupa.com/developer/mx/preloader_transition.htm)and completed it

However I can not implement my “bar” preloader into the tutorial. I am able to make it say “loading” as the movie loads but just cant find where to put the AS for the bar preloader.

* * *

This is the code I am using for the bar preloader

“setProperty(“bar”, \_xscale, (\_root.getBytesLoaded()/\_root.getBytesTotal())\*100);  
trace (\_root.\_totalframes)”

* * *

This is where I tried to put my code but it doesnt seem to work

In the “content” MC (which loads the external swf)

onClipEvent (enterFrame) {  
if (!loaded && this.\_url != \_root.\_url) {  
if (this.getBytesLoaded() == this.getBytesTotal()) {  
loaded = true;  
\_root.transition.gotoAndPlay(“opening”);  
}  
}  
}

* * *

If anyone would be able to take a quick look at the tutorial and help me out that would be awesome

btw you can download the source code here [http://www.kirupa.com/developer/mx/code/complete.zip](http://www.kirupa.com/developer/mx/code/complete.zip)

Thankyou so much
