PDA

View Full Version : loading external swf's sequentially



martink
12-07-2005, 01:33 AM
I have created a master.swf that is approx. 600 frames long. While it plays, it loads other swf files from a server into their corresponding layers, which each have an instace of a movie clip symbol to house these swf files.

My problem is - everytime I go to view the file online - I have to play it once, to let it store in the cache of the browser, and then play it again to see it smoothly. Obviously this is not something I want others to deal with.

So I went ahead and created a preloader to load all the content initially, before the master.swf file plays. But it doesn't work because the swf files load sequentially into master.swf, as it plays to frame 600.

Is there a way to have the swf files load initially, so that the preloader can load all the content before the movie begins playing, and then call the swf files to play on certain frames throughout the movie?

My goal is to have this large compilation of swf files play smoothly. Any help would be tremendous!

Thanks,
Martin

NTD
12-07-2005, 01:58 PM
Hi,

You can't preload something on a timeline if if the playhead hasn't reached the spot in the timeline where the content loads. You can achieve what your suggesting, but it might require a rewrite of how you have things set up now........ for a 600 frame movie, it would probably be alot of work. The first suggestion that comes to mind is to load your movies into their respective holder movieclips all in the first frame of the movie. This would allow the preloader to cover the loaded content. You could set all the holder movieclips visible property to false and toggle that property for each movieclip you want to reveal. You could also create a preloader for the content being loaded into the movieclip. Instead of .........

_root.getBytesLoaded/_root.getBytesTotal.

For a movieclip preloader, you just include the instance name of the movieclip........
root.mcHolderName.getBytesLoaded/_root.mcHolderName.getBytesTotal

Keep in mind that preloaders should be tested online. Files often load to fast locally to ever see the preloader in action.

Hope it helps
NTD