PDA

View Full Version : Site layout VS download order


messfest
05-31-2003, 10:23 AM
NOTE: I have posted a question and somebody was helping me, they were just waiting for code. If you are there, please accept my apologise, I cant find my previous thread to post it to you!!

My problem is that within my site I have set up a menu screen that leads to 18 different pages. Each page downloads in consecutive order, and it takes ages to download the 18th page. The problem is if I click on the 18th link first, it will take forever to get there, as it has to download all 18 pages before displaying it.

Is there anyway around this?

tost
05-31-2003, 10:52 AM
why do you need to preload the pages? can't u wait 'till a user clicks a page and then load it?
that's the whole idea of multiple swf's, if you're going to load them all in straight away there's not much difference with putting them all in the main fla. Same loading times (or a little more), but a bandwidth raise in general on your site, as every user will load all pages and not just those he chooses to load.. You might not want to do this.
I've been working with something like that, and i regretted it afterwards. it could be great if you could predict which menu button the user is going to click, but you can't. :)

i had something like
- 20 pages
- main loads and starts loading sub1
- if sub1 has loaded, it triggers a function to load the next sub, and sets the menubutton for sub1 to active,
- sub2 triggers sub3, etc. and sets menuBttn sub2 active,
etc..
so basically: disable buttons first, enable them as their corresponding sub has loaded.

if you want to go through with it, just an idea for your problem; if you start loading a page, set a 'flag' variable to 'remember' what section you're loading, and when the user clicks page 18,
check the var to know what movie is loading,
delete the loading movie,
start loading page 18,
if page 18 has loaded,
check the var to know what movie WAS loading,
load that movie again, and then the next one,...

good luck :)
tost

messfest
06-01-2003, 11:31 AM
Thank you,
I hadnt really cottoned onto the idea of multiple swf's.
Your other idea sounds good, though I think I will go with the multiple swf's.

How do I set a button to load and play a seperate swf?