# Dynamic Preloader

**URL:** https://forum.kirupa.com/t/dynamic-preloader/194389
**Category:** flash
**Created:** [July 22, 2006, 8:27pm UTC](https://forum.kirupa.com/t/dynamic-preloader/194389 "2006-07-22T20:27:27Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![riveroaks](https://avatars.discourse-cdn.com/v4/letter/r/90db22/32.png) [@riveroaks](https://forum.kirupa.com/u/riveroaks)
#### Post date: [July 22, 2006, 8:27pm UTC](https://forum.kirupa.com/t/dynamic-preloader/194389/1 "2006-07-22T20:27:27Z")

</div>

I’ve created preloaders for sites and I understand the mechanics of a preloader fine. They are not complicated. But in my current site I am making use of a lot of dynamic loading such as JPEGs and SWFs etc. I want to create a preloader that I can apply to anything I’m loading, basically just a colored rectangle with a loading bar.  
I thought I could figure out how to create a dynamic preloader but it seems that I keep running into unusual constraints in Flash. My thinking was to make a movie clip preloader that I export for actionscript, then attach it to the stage and call a function passing it the object I am loading. Then this preloader would run the usual preloading script but instead of referring to the main timeline it would be referring to the object I passed in. I’m updating the load status with an onEnterFrame function but my preloaders start at 0% and don’t change until 100% so obviously the clip is not updating and at this point I’m just not sure where to go with this preloader.  
Can anyone either give me a general explanation of how I can successfully create one of these preloaders or provide a link to a tutorial?
