Hey all! I need some help with preloading components.
The setup:
I have two swf files. One is a nice little 1 kb preloader, that loads the main swf (at around 100k, not that it matters). The main swf file consists of one frame with a bunch of code in it. This swf file also uses a couple of custom classes, which in turn use the Alert component to inform the user about various things. Point is, everything happens in one frame. In the preloader everything also happens in one frame only. I load the main swf using the MovieClipLoader() class.
The problem:
If I load the main swf through the preloader, then the Alert dialogs don’t show up and flash reports “Failed to create a new alert, probably because there is no Alert in the Library”. If I load the main swf directly, everything works (because the Alert component is in the library of the main swf). Now, one solution is to add the Alert component to the preloader’s library. Then everything works just dandy. However, this action increases the filesize of the preloader to about 50kB. Not so fun since I’d spend half the time waiting for the preloader to load just because of this.
So what I’m looking for is a solution that would allow me to keep the Alert component in the library of the main swf only, so that I could keep the preloader small.
Any suggestions?