mcmcom
10-18-2004, 11:16 PM
Hi all,
got a new one for ya:
I have a top level .swf that loads up to 5 .swf files into it. It uses a combobox to select them. One of the 5 is set to a default (the one that loads first). This loads and displays in it and you can read it, then when your done, go pick another document. My boss wants the other docs to start loading in the background before the user calls them (therefore if they read the whole first doc, hopefully all the others will be loaded by the time they want to select them) So I need some help on my algorithm to do this.
Heres what i got so far: Tell me if im way off.
1. The first document loads by itself, to ensure it loads as quickly as possible
I should probably wait until its 100% loaded before i start any background
loading... (right?)
2. Once its %100 (what will i use to test that, onEnterFrame? or a listener
perhaps?) I should create an empty clip off the stage and at a level below
my viewable area and start loading the next document in the array.
3. Somehow must keep track of that one loading and when its 100% then I
move to the next item in the array, (and so on and so forth)
This sounds pretty straight forward to me but I wanted to ask this. If I create an empty clip, and load an external .swf to it. Then Remove it (so I can load the next) Will that nullify my preloading? Or will the .swf be cached locally by now? Do I have to create a new holder Clip for EACH .swf and keep them loaded (but not visible) in the background? Or can i just load them then blow them away and call them when i need them?
THANKS FOR THE INFO
also if anyone knows to create a listener for completed or loaded Bytes, an example would be appreciated.
Thanks
McM
got a new one for ya:
I have a top level .swf that loads up to 5 .swf files into it. It uses a combobox to select them. One of the 5 is set to a default (the one that loads first). This loads and displays in it and you can read it, then when your done, go pick another document. My boss wants the other docs to start loading in the background before the user calls them (therefore if they read the whole first doc, hopefully all the others will be loaded by the time they want to select them) So I need some help on my algorithm to do this.
Heres what i got so far: Tell me if im way off.
1. The first document loads by itself, to ensure it loads as quickly as possible
I should probably wait until its 100% loaded before i start any background
loading... (right?)
2. Once its %100 (what will i use to test that, onEnterFrame? or a listener
perhaps?) I should create an empty clip off the stage and at a level below
my viewable area and start loading the next document in the array.
3. Somehow must keep track of that one loading and when its 100% then I
move to the next item in the array, (and so on and so forth)
This sounds pretty straight forward to me but I wanted to ask this. If I create an empty clip, and load an external .swf to it. Then Remove it (so I can load the next) Will that nullify my preloading? Or will the .swf be cached locally by now? Do I have to create a new holder Clip for EACH .swf and keep them loaded (but not visible) in the background? Or can i just load them then blow them away and call them when i need them?
THANKS FOR THE INFO
also if anyone knows to create a listener for completed or loaded Bytes, an example would be appreciated.
Thanks
McM