# How to force preloader countdown

**URL:** https://forum.kirupa.com/t/how-to-force-preloader-countdown/61566
**Category:** Uncategorized
**Created:** [August 19, 2004, 5:11pm UTC](https://forum.kirupa.com/t/how-to-force-preloader-countdown/61566 "2004-08-19T17:11:29Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![kirstenosborn](https://avatars.discourse-cdn.com/v4/letter/k/5f8ce5/32.png) [@kirstenosborn](https://forum.kirupa.com/u/kirstenosborn)
#### Post date: [August 19, 2004, 5:11pm UTC](https://forum.kirupa.com/t/how-to-force-preloader-countdown/61566/1 "2004-08-19T17:11:29Z")

</div>

hello. I was wondering how to force a preloader countdown? I saw this done on this site:

> **[Push | We push restaurant, retail and education brands.](https://www.pushhere.com/)**
>
> Push creates beautifully crafted brands that actively engage customers in the restaurant, retail and education spaces.

I used this tutorial from kirupa:  
[http://www.kirupa.com/developer/mx/percentagepreloader.htm](http://www.kirupa.com/developer/mx/percentagepreloader.htm)

but I guess my file is not heavy enough to start from one up to 100. It starts at like 40 and up to 80, then right into the movie. So I was wondering if I could force the preloader to go from 1 to 100?

Thanks for any help!!  
k  
:azn:

---

<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: [August 19, 2004, 9:49pm UTC](https://forum.kirupa.com/t/how-to-force-preloader-countdown/61566/2 "2004-08-19T21:49:56Z")

</div>

yer, ill take your % complete variable as being called _percent_ (creative i know… but hey!)

now then on your preloader, make your text box equal a variable called _ForcedPercent_.

now on your code have a simple setInterval function like so:

```auto
forceP = setInterval(FPercent,x)

```

where x is however long you want in ms 😉  
now declare a function as such:

```auto
function FPercent(){
	if(ForcedPercent != percent){
		ForcedPercent++
	}
	if(ForcedPercent == 100 == percent){
		clearInterval(forceP)
		// any other code you want to run on preloader completion suchas a goto or a hide (*._visible*) action...
	}
}

```

hope this works4u… also, if you have preloader bars etc use the variable ForcedPercentage to work out their width/height/alpha/x/y values etc…

Prophet.

---

<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: [August 20, 2004, 2:29am UTC](https://forum.kirupa.com/t/how-to-force-preloader-countdown/61566/3 "2004-08-20T02:29:06Z")

</div>

i do try that but it’s gettin messy maybe something wrong with my preloader code…

---

<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: [August 20, 2004, 3:52am UTC](https://forum.kirupa.com/t/how-to-force-preloader-countdown/61566/4 "2004-08-20T03:52:52Z")

</div>

hey there. thanks for helping. i tried to use the code, but it didnt show the countdown. I set up three frames. The third frame is where I want to go after the preloader completes. On the first frame I have this

(dynamic text box named Var=ForcedPercent):  
forceP = setInterval(FPercent,x)

function FPercent(){  
if(ForcedPercent != percent){  
ForcedPercent++  
}  
if(ForcedPercent == 100 == percent){  
clearInterval(forceP)  
gotoAndStop(3);  
}  
}

Do you know why it is not being forced into counting up to 100 percent?

Thanks again!!  
I attatched the file too…
