Complex web applications and loading. Best praxis

Hi. Forgive me if this has all been covered already in some pretty post, though I spent a couple of hours googling over this without finding the answers I was looking for.

I wanted to create a loader for a fairly complex web app I’m working on and stumbled upon a number of problems.
That got me thinking about best praxises when dealing with loading and structure.

It seems to me that the old way of creating a huge swf-file, and then create the preloader loading it all doesn’t work very well anymore.
I’m thinking that AS3 is more suited for creating the main app and then load all your assets from external sources, thus keeping control of the loading within the main-app. Much like heavier languages works (or?).

Here’s some of the problems I ran into.

[COLOR=#000055]1) I had a few assets in the library of the main swf with linkage set (flash creating the necessary classes) but at compile time I got errors at the lines adding those assets saying “1180: Call to a possibly undefined method [linkagename].”. I bypassed those lines to prevent the errors. Does assets with linkages set need to have custom classes?[/COLOR]

[COLOR=#000055]2) When finished loading my main swf I couldn’t cast the loader content to the document class of the main swf, but had to cast it as MovieClip to make it work. What’s up with that? But now at least I was able to publish the movie.[/COLOR]

[COLOR=#000055]3) Now I got runtime errors complaining about some objects I had placed on stage. I read somewhere that you have to enable “Automatically declare stage instances” in AS3 settings. I checked and it was already enabled in both the loader and the main swf but I still got errors.[/COLOR]
[COLOR=#000055]At this point I gave up the whole pre-loader idea. [/COLOR]

So what now. My next idea is to put all graphic objects in a seperate swf with linkages set (some of them will be using custom classes, other flash-generated classes), and then load that swf into the main file. So, question is, how do I access those assets from the main file? I haven’t tried it out properly yet but I know it demands some special procedure and could use some guiding.

I’d love to here some comments about all this.

cheers :: nook