# Giant for loops - can they have "preloaders"?

**URL:** <https://forum.kirupa.com/t/giant-for-loops-can-they-have-preloaders/24660>\
**Category:** flash\
**Created:** [July 3, 2003, 6:58am UTC](https://forum.kirupa.com/t/giant-for-loops-can-they-have-preloaders/24660 "2003-07-03T06:58:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jingman](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/jingman/32/163_2.png) [@jingman](https://forum.kirupa.com/u/jingman)\
**Post date:** [July 3, 2003, 6:58am UTC](https://forum.kirupa.com/t/giant-for-loops-can-they-have-preloaders/24660/1 "2003-07-03T06:58:12Z")

</div>

I tried to search for this, but it’s kind of a weird question, so getting the wording right is difficult.

I want to generate huge amounts of data with a for loop, something like, for(i=0; i\<100000; i++).

When I do this, naturally, my browser gives me a warning about flash slowing it down. How can I have like, a preloader for a for loop? Something that shows how close the for loop is to finishing, that kind of thing.

Thanks.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 7:14am UTC](https://forum.kirupa.com/t/giant-for-loops-can-they-have-preloaders/24660/2 "2003-07-03T07:14:19Z")

</div>

you can’t…  
you may try

```auto
if(statement){actions}

```

but it goes frame-by-frame

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [July 3, 2003, 7:25am UTC](https://forum.kirupa.com/t/giant-for-loops-can-they-have-preloaders/24660/3 "2003-07-03T07:25:03Z")

</div>

thanks. I have found a way around it.

[AS]time = 30;  
points = time\*200;  
interval = 100;

onEnterFrame = function(){  
for(i=0; i\<interval; i++){  
timer += 0.005;  
\_root.display += timer+" “+getTimer()+”  
";  
}  
loadval += (interval/points)\*100;  
if(loadval \> 100){  
gotoAndStop(2);  
}else{gotoAndPlay(1)};  
}[/AS]

And I have a dynamic text box displaying “loadval” in the first frame, so I can see how far along it is.
