# Preload. (please read)

**URL:** https://forum.kirupa.com/t/preload-please-read/25659
**Category:** flash
**Created:** [July 15, 2003, 3:05pm UTC](https://forum.kirupa.com/t/preload-please-read/25659 "2003-07-15T15:05:20Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![Janik](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@Janik](https://forum.kirupa.com/u/Janik)
#### Post date: [July 15, 2003, 3:05pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/1 "2003-07-15T15:05:20Z")

</div>

Hi there!  
I’ve been reading and reading though this forum for nearly 3 days without finding the excact solution i wan’t, so i’m very sorry if it has been mentioned somewhere!  
ok… here’s my prob:  
I’ve almost completed my first flash site ever. It has been build as ONE .swf file . I figure out the final site will be about 100 kb in size so I really want a preloader!  
what i’m thinking of is… when you go the my homepage url. you’ll see a preloader bar preloading my site (site.swf). when it’s done, u can acess my site.  
so i figure out i’'ll need TWO swf’s. one showing the animation of the preloader and being sort of a “container” for my site. and the other SWF being my site.  
I really have NO clue at all how i’m going to do that?! i have read Claudios guide without really understanding ☹  
Please… if there are one very nice person out there that would help me, i would be very thankfull!

Janik

---

<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 15, 2003, 3:38pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/2 "2003-07-15T15:38:58Z")

</div>

Ok… i’ve come one step closer to a solution!  
i’ve read “lostinbeta”'s guide, and understood it quite good!

Only ONE i now need solved!

bytes\_loaded = Math.round(this.getBytesLoaded());  
bytes\_total = Math.round(this. ());  
getPercent = bytes\_loaded/bytes\_total;  
this.loadBar.\_width = getPercent_100;  
this.loadText = Math.round(getPercent_100)+"%";  
if (bytes\_loaded == bytes\_total) {  
this.gotoAndPlay(3);  
}

this is his code… by HOW(!!) do i get the preloader to get “getBytesLoaded” and “getBytesTotal” from an url. (http//www.mysite.com/site.swf) so that it loads THAT file instead of “This”.

Still hoping for a nice person to help me…

---

<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 15, 2003, 3:40pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/3 "2003-07-15T15:40:58Z")

</div>

You don’t need that. It can be 1 SWF file and all you need to do is have it go to another scene or however you want to organize it. Just set it up so that after it is done preloading then have it go to a stop frame that has your ‘button’ which leads into loading your site.

---

<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 15, 2003, 3:43pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/4 "2003-07-15T15:43:59Z")

</div>

yes i know… but… how do i tell “getBytesTotal” and “getbytesloaded” to get informations from my movie @ http//www.mysite.com/site.swf ?  
Could u possible give an exsample?  
🙂

---

<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 15, 2003, 3:45pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/5 "2003-07-15T15:45:17Z")

</div>

oh k. Let me work something up for you. I’ll brb.

---

<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 15, 2003, 4:12pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/6 "2003-07-15T16:12:46Z")

</div>

Try this.  
I am on a high-speed connection so I rarely see preloaders.

[http://www.kernlearn.net/percentPreloaderJacked.swf](http://www.kernlearn.net/percentPreloaderJacked.swf)  
[http://www.kernlearn.net/percentPreloaderJacked.fla](http://www.kernlearn.net/percentPreloaderJacked.fla)

You may have this working but trying it from a local machine doesn’t work because your HD is just a tad bit faster than say 56k.

---

<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 15, 2003, 4:21pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/7 "2003-07-15T16:21:58Z")

</div>

thanks alot for taking your time for that exsample. But it doesn’t really answered my question. HOW do I tell the preloader that it shall preload the object found at forexsample “[www.mysite.com/SITE.SWF](http://www.mysite.com/SITE.SWF)” . so it preloads the file found at the url and then go to the next frame where a button is, so that the user can access the site by clicking the button.

---

<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 15, 2003, 4:27pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/8 "2003-07-15T16:27:23Z")

</div>

I tried to explain that already. You cannot preload something else from your movie. If you look @ the FLA you will see how it all works. You just need to put a btn outside your site. If you want then put it in a different scene and then after the preload is done then have a btn that makes it go to a different scene. Even with external preloading it all has to exist inside of 1 SWF. If you look @ Claudio’s example you will see that it doesn’t leave the SWF. Also, you can check out [This site I made](http://www.kernhigh.org/Hire). I use external preloaders there but if you see it doesn’t start until you click on the section you want.

I hope this is some help to you.

Taylor  
(AKA DigitalPimp)

---

<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 15, 2003, 4:45pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/9 "2003-07-15T16:45:02Z")

</div>

Taylor is right, you only need one .swf, and it could reside on [www.yoursite.com](http://www.yoursite.com)… so you would only need one webpage, and one swf.

The preloader works in the first 2 frames, and getBytesTotal gets the size of the current project you are in.

when getBytesLoaded finally equals the total size of the current project (getBytesTotal), it continues on with the rest of the project.

So you could send it to a different frame, or scene, or whatever.

---

<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 15, 2003, 7:49pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/10 "2003-07-15T19:49:56Z")

</div>

ok… thanks ALOT guys! i finally understood the whole point. that it’s not possible to load any url.  
Scene 1 where my whole site is… there is alot of layers. so what you are saying, is to move all layers key frames about 3 frames forward then made a layer named “preload” where the animation and actions of the layer is located right?  
in that way i’ll start at frame 1 showing the movie loading, the jump to frame 2 where i’ll put in a button, from where the user can click to see the site.  
one more thing… “btn” = ?  
but again… thanks so much! you’re very friendly people!  
Janik

---

<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 15, 2003, 7:51pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/11 "2003-07-15T19:51:31Z")

</div>

Look @ my example I posted. You are sorta getting the idea but look @ my FLA as to how everything is layed out exactly. Also, btn = button.

Good luck.

---

<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 15, 2003, 8:12pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/12 "2003-07-15T20:12:00Z")

</div>

hmm i doesn’t seem to work… i’ve made the “preload” layer as yours… only changed it to jump to frame 4 when it’s done loading.  
Please look at the pasted pic… it’s a pic of how my movie is orginazed.

---

<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 15, 2003, 8:19pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/13 "2003-07-15T20:19:41Z")

</div>

Did you change it in the AS? How are you testing this?

---

<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 15, 2003, 8:22pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/14 "2003-07-15T20:22:20Z")

</div>

how do you mean edited in the AS… i edited the AS for the pre loader… i’m testing by saying ctrl + enter twice for a 56k connection…

---

<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 15, 2003, 8:29pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/15 "2003-07-15T20:29:23Z")

</div>

Can you explain to me better what your problem is that your having?

---

<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 15, 2003, 8:31pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/16 "2003-07-15T20:31:14Z")

</div>

yes…  
when i’m testing to loadbar is NOT showing at all.  
the site is all blank.  
I really don’t understand why the loadbar isn’t showing ☹

---

<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 15, 2003, 8:34pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/17 "2003-07-15T20:34:50Z")

</div>

Can you post your FLA?

---

<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 15, 2003, 8:43pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/18 "2003-07-15T20:43:35Z")

</div>

yeah offcause!  
I’m sorry if it’s a bit bad… it’s my very first movie so… also it’s not finish yet 🙂  
i had to upload it… it was a bit too big…  
[http://www.janik.frac.dk/site2(ppreloadtest).fla](http://www.janik.frac.dk/site2(ppreloadtest).fla)

---

<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 15, 2003, 8:54pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/19 "2003-07-15T20:54:37Z")

</div>

the Link is bad.

---

<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 15, 2003, 8:56pm UTC](https://forum.kirupa.com/t/preload-please-read/25659/20 "2003-07-15T20:56:39Z")

</div>

no no…

it’s: [http://www.janik.frac.dk/site2(ppreloadtest).fla](http://www.janik.frac.dk/site2(ppreloadtest).fla)

copy it all and paste.

[Next page](https://forum.kirupa.com/t/preload-please-read/25659.md?page=2)
