# Problem with preloading not appear as suppose to

**URL:** https://forum.kirupa.com/t/problem-with-preloading-not-appear-as-suppose-to/58295
**Category:** Uncategorized
**Created:** [July 21, 2004, 11:04am UTC](https://forum.kirupa.com/t/problem-with-preloading-not-appear-as-suppose-to/58295 "2004-07-21T11:04:16Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![pixeldude](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@pixeldude](https://forum.kirupa.com/u/pixeldude)
#### Post date: [July 21, 2004, 11:04am UTC](https://forum.kirupa.com/t/problem-with-preloading-not-appear-as-suppose-to/58295/1 "2004-07-21T11:04:16Z")

</div>

aii everyone…i have a problem with my preloader…my main swf totally 227 kb…it seem’s not appear as suppose to and this is my code:

1st frame:( i place the prealoder at 1st frame)

stop()

//and on mc preloader itself

onClipEvent (enterFrame) {  
loading = \_root.getBytesLoaded();  
total = \_root.getBytesTotal();  
percent -= (percent-((loading/total)_100))_.25;  
per = int(percent);  
percentage = per+"%";  
if (percent\>99) {  
\_root.gotoAndStop(2);  
}  
}

so my problem is this preloader not appear emm…can anyone help me

u guy’s can check here for detail  
[detail](http://www.geocities.com/mrpixel04/test.htm)

---

<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 21, 2004, 11:20am UTC](https://forum.kirupa.com/t/problem-with-preloading-not-appear-as-suppose-to/58295/2 "2004-07-21T11:20:36Z")

</div>

It doesn’t look like you’re actually loading a movie at all there. Is this all the code?

also,

percent = Math.round((loading/total)\*100);

is a simpler way to do the percentage, unless yours is using some strange method you didn’t mention. What is the \*.25 bit for?

HTH

---

<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 21, 2004, 12:38pm UTC](https://forum.kirupa.com/t/problem-with-preloading-not-appear-as-suppose-to/58295/3 "2004-07-21T12:38:17Z")

</div>

put this on the first keyframe:

```auto

this.onEnterFrame = function() {
	tBytes = Math.round(this.getBytesTotal());
	lBytes = Math.round(this.getBytesLoaded());
	perc = (lBytes/tBytes);
	pText = Math.round(perc*100)+"%"
	bar._width = (perc*200);
	if(lBytes == tBytes) {
		this.gotoAndStop(2);
		delete this.onEnterFrame;
	}
	else {
		this.stop();
	}
}

```

where pText is the var of the text box, not instnace name…  
and

```auto

bar._width = (perc*200);

```

multiply by the width of your load bar…

---

<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 22, 2004, 2:31am UTC](https://forum.kirupa.com/t/problem-with-preloading-not-appear-as-suppose-to/58295/4 "2004-07-22T02:31:05Z")

</div>

tq…for ur response…dude…

but anyway even i follow ur example my preloader still not appear…i don’t know what happen…as u can see here[here](http://www.geocities.com/mrpixel04/test.htm)

but i’ll figure out…emmmm

---

<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 22, 2004, 3:28am UTC](https://forum.kirupa.com/t/problem-with-preloading-not-appear-as-suppose-to/58295/5 "2004-07-22T03:28:49Z")

</div>

Can anyone take look my fla file…maybe something wrong with my code i think

u can download zip file [here](http://www.geocities.com/mrpixel04/real.zip)

thank u in advanced…

---

<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 22, 2004, 9:14am UTC](https://forum.kirupa.com/t/problem-with-preloading-not-appear-as-suppose-to/58295/6 "2004-07-22T09:14:40Z")

</div>

Anyone ? can figure out for me…!! i’m totally lost it…  
it’s only appear at 98% percent loading status and so on…hah…

really need help with it…?

---

<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 22, 2004, 4:24pm UTC](https://forum.kirupa.com/t/problem-with-preloading-not-appear-as-suppose-to/58295/7 "2004-07-22T16:24:14Z")

</div>

Dead link:stunned:

scotty(-:

---

<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 23, 2004, 12:48am UTC](https://forum.kirupa.com/t/problem-with-preloading-not-appear-as-suppose-to/58295/8 "2004-07-23T00:48:45Z")

</div>

thanks for ur reply sir…it’s good to have a response from u sir…

i just upload new file u can view my fla [here](http://www.geocities.com/mrpixel04/real.fla)

I hope u can figure out for me sir…i guess something wrong with my code on 3rd 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 23, 2004, 1:15am UTC](https://forum.kirupa.com/t/problem-with-preloading-not-appear-as-suppose-to/58295/9 "2004-07-23T01:15:11Z")

</div>

it’s probably because you’re attaching sound using AS, there for it’s not loaded at the beggining of the movie…what you need to do, is put in an ‘invisible frame’ or one that never gets seen, say the 3rd frame, drag your music sounds in that keyframe, then make the 4th keyframe start with your stuff…change the if statement on your preloader from:

```auto

	if (bytes_loaded == bytes_total) {
		_root.gotoAndStop(3);
	}

```

to:

```auto

	if (bytes_loaded == bytes_total) {
		_root.gotoAndStop(4);
	}

```

Using that method, you skip the third frame, your stuff is preloaded, and your bar will appear correctly…

---

<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 23, 2004, 1:46am UTC](https://forum.kirupa.com/t/problem-with-preloading-not-appear-as-suppose-to/58295/10 "2004-07-23T01:46:35Z")

</div>

If i’m using the method u just mention…by dragging sound on the 3rd frame how i’m gonna loop sound…and control sound …

Maybe i have to load sound first and then load the rest…what u think?i 'll try it…?

anyway tq for ur response…

---

<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 23, 2004, 7:27am UTC](https://forum.kirupa.com/t/problem-with-preloading-not-appear-as-suppose-to/58295/11 "2004-07-23T07:27:26Z")

</div>

arghh still lost it…where are the as GURU’s gone…he…he…

---

<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 23, 2004, 8:46am UTC](https://forum.kirupa.com/t/problem-with-preloading-not-appear-as-suppose-to/58295/12 "2004-07-23T08:46:14Z")

</div>

[http://69.64.32.29/~fallxcom/files/preloadSound.fla](http://69.64.32.29/~fallxcom/files/preloadSound.fla)  
check it…  
for more on sound control, go to [www.kennybellew.com](http://www.kennybellew.com)

---

<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 23, 2004, 10:24am UTC](https://forum.kirupa.com/t/problem-with-preloading-not-appear-as-suppose-to/58295/13 "2004-07-23T10:24:07Z")

</div>

yes…finally my miserable dream has dissapear he…he…really big thanks to macneilslt…ur example fla really help me…thank u …

i notice that my file are so small in size that’s why the preloader doesn’t appear at all…my mistake… anyway tq again…

peace…
