if most of your assets are exported for actionscript, that will cause the problem you describe. and any number of errors on your part can cause a preloader to fail.
so, first thing is to check is your have a lot of assets exported in frame 1 for actionscript.
On 1st frame I have nothing exported for actionscript, but I have 3 movie clips exported as classes for actionscript, they are 3 pages of my site and they are imported into a movieclip container, one of them as the site loads, others when menu buttons are clicked. When I click a button the shown page is removed and the new one is added.
If this is the problem, how can I solve it?
Why the default preloader works?
Do I have to create an external preloader moviclip (a 2nd sw file) and import it as I do with the default one? Isn't there another solution?
1 person found this helpful
those 3 classes are exported in frame 1 unless you take steps to prevent that. but 3 classes wouldn't typically cause a preloader problem.
what's the flash profiler show is loading in frame 1 vs other frames?
This is my 1st experience with a Flash website, before of this I only made some simple animations for banners and few other things, I'm not used to use Flash so I'm not sure to understand you mean with "profiler".
I've checked around on internet and everything related to profiler takes me to Flash Builder, I'm not using it, I'm doing everything in Flash CS5.
What should I check to answer your question about the profiler in use?
Do all the library stuff's belongs to 1st frame?
If not I can't understand why 1st frame weight grows if I don't add anything to it.
On the contrary, if library counts for the 1st frame, what should I do to solve the situation?
so, you are exporting about 1mb of assets in your first frame. that all will load first, then your preloader will display the loading of the last 0.1% of your site.
so, what you're seeing is exactly as explained as the most common scenario causing that problem.
to remedy, either:
1. create a new swf that contains only your preloader assets and loads your current/main swf and displays its load-progress or
2. change all your assets to load in frame 2.
Thanks for your reply.
Earlier today I've tried to do what you say in point 1.
I created a preloader on a swf file, then the whole site on another one and on publish settings (the setting told in my 1st post) of the site I've pointed to my preloader swf.
The result has ben that the 1st frame was less than 32KB and the 2nd around 1MB, so a good situation.
The problem is that my preloader doesn't know the wheight of the 2nd frame, so it last only for the 32KB of the 1st frame, then I have a pause before to see the site due to the download of the 2nd frame.
How can I make my preloader know the wheight of the 2nd frame in order to have the correct behaviour?
Another try I did has been to put the preloader on 1st frame, on the 2nd I only put a movieclip in which I loaded an external swf containing the whole site, again I had the problem that the preloader finished its work before to load the site's swf as said above.
If your 2nd suggestion is easier to implement, what should I do to do it?
the publish settings preloader is for runtime shared libraries only. are you using tlf textfields in your main swf?
if not, that setting is, almost certainly, irrelevant for you.
your preloader swf would contain code to create a loader like:
var ldr:Loader=new Loader()
I have few TLF text fields on one of my exported elements for AS, but I've already tried also changing them into classic textfields.
This is the 1st time that I'm facing a prelaoder, so I've done everything as seen on a tutorial found on developphp.com website (this is the link to that tutorial http://www.developphp.com/Flash_tutorials/show_tutorial.php?tid=291) and it didn't use a Loader() variable, probably because their preloader is not on a different swf then the site.
Can you give me some hint or link me any tutorial which explains how to create a stand alone preloader to add to another swf? I haven't found any.
in your new fla that will load your main swf, you can start with:
var tf:TextField=new TextField();
var ldr:Loader=new Loader();
ldr.load(new URLRequest("main.swf")); // assuming main.swf is the correct file name
Ok, it almost works, I've adapted the code to my loader, now it correctly loads as I expected, I only have a problem with a "null element" which doesn't make appear my site as it does if started alone (it is not automatically resized)... but I think this is another problem, the preloader one is solved.
I think I'm having a similar problem on huffcommunications.com. When my logo is clicked, a drop down menu is supposed to happen but it takes about 15 seconds before the animation actually happens. Could you be so kind as to explain what you mean when you say 'export all assets to first frame' and how to do it.
I guess I'm looking to preload my entire site, and I think that is what you began to answer here. Thanks a lot.
that's default behavior and won't help a preloading problem. exporting for frame 2 or beyond will help a first frame preloader.