-
Preloading individual scenes
Hello,
I have built a web site in one whole .swf. It is split into scenes and there is a preloader for each scene. This works great.
The preloader used is one that displays the percentage of the loaded file in the form of a bar.
The problem is that when pre viewing the site, it will not play untill the ENTIRE site is loaded. This means that it takes a while for the site to load.
I would like to know if it is at all possible to load each scene individually while still showing the user how much of the page is loading.
For example - loading scene 1, then when loaded playing scene 1, while the rest of the site loads.
If you get me?
Can anyone help?
I remove your roof n*gga let the sun shine in/
Thirty-eight waist, enough to put one nine in/
Really a thirty-six without the gun I'm thin/
but when the gat is tucked, I'm fat as f***...
- Jay-Z -
-
Senior Member
You can not stop Flash from loading, and it will always load things in the order the scenes are.
One way to check if scene 1 is loaded is to check for _framesLoaded instead of the usual getBytesTotal(); as this checks for the whole movie.
So you have to count the frames and ask
if(_root._framesLoaded == 124 ){
// Do something
....then you know that 124 frames has been loaded and can sen the timeline to the next place.
You can have the preloader inside or ON a movieclip so it will run independently of the current timeline. You have to use one/scene though ( in all 3 different movieclips ).
-
Thanks
Thank you for this. I shall give this a try.
Im not entirely hot on action scripting so it'll probably take me ages to figure out how this 'll fit into the rest of my code.
I'll come back if I have any difficulties.
Cheers
I remove your roof n*gga let the sun shine in/
Thirty-eight waist, enough to put one nine in/
Really a thirty-six without the gun I'm thin/
but when the gat is tucked, I'm fat as f***...
- Jay-Z -
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|