I've just looked through the preload archives and can't find anything that specifically answers my problem, or at least that I can understand.
I have a percentage preloader which calculates percentage loaded, bytes loaded and has a loadbar etc. It uses 2 scenes, the 1st scene is the preload code and the 2nd scene is the content.
I have 2 movies, the 1st is an intro and the second is my main site. The intro is just one movie (eg intro.swf) that is replaced by the 2nd (eg homepage.swf) after it ends.
The preloader works fine for the intro.swf but not for the homepage.swf. The main difference between the 2 movies is that the main site is just a blank one frame movie that loads in all the other elements, such as navigation & visual elements etc, as separate swf files.
I used the following preload code:
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
bar.gotoAndStop(percent_done);
ifFrameLoaded ("Scene 2", 1) {
gotoAndPlay ("Scene 2", 1);
}
All that happens (when I test on the web)is that the preload bar flashes up for a second then a blank screen appears and the browser eventually crashes.
I'm not sure whether I need to add relative paths to each of the separate swf's that I'm trying to load in (there's about 8 in all).
Could someone tell me if this is what I need to do or if I'm missing something here.
Thanks for your patience.
I have a percentage preloader which calculates percentage loaded, bytes loaded and has a loadbar etc. It uses 2 scenes, the 1st scene is the preload code and the 2nd scene is the content.
I have 2 movies, the 1st is an intro and the second is my main site. The intro is just one movie (eg intro.swf) that is replaced by the 2nd (eg homepage.swf) after it ends.
The preloader works fine for the intro.swf but not for the homepage.swf. The main difference between the 2 movies is that the main site is just a blank one frame movie that loads in all the other elements, such as navigation & visual elements etc, as separate swf files.
I used the following preload code:
total_bytes = _root.getBytesTotal();
loaded_bytes = _root.getBytesLoaded();
remaining_bytes = total_bytes-loaded_bytes;
percent_done = int((loaded_bytes/total_bytes)*100);
bar.gotoAndStop(percent_done);
ifFrameLoaded ("Scene 2", 1) {
gotoAndPlay ("Scene 2", 1);
}
All that happens (when I test on the web)is that the preload bar flashes up for a second then a blank screen appears and the browser eventually crashes.
I'm not sure whether I need to add relative paths to each of the separate swf's that I'm trying to load in (there's about 8 in all).
Could someone tell me if this is what I need to do or if I'm missing something here.
Thanks for your patience.