Preload. (please read)

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 :frowning:
Please… if there are one very nice person out there that would help me, i would be very thankfull!

Janik

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 = getPercent100;
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…

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.

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?
:slight_smile:

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

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.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.

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” . 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.

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. 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)

Taylor is right, you only need one .swf, and it could reside on 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.

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

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.

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.

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

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…

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

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 :frowning:

Can you post your FLA?

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

the Link is bad.

no no…

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

copy it all and paste.