Don't worry about linking them externally. Optimise your module swf
against the main swf, and it'll strip out any classes which will have
already been loaded, while leaving the ones that the module requires.

 

Note that you have to be very careful of your application domains when
doing this, loading the module into a different domain will result in
class not found Errors.

 

Gk.

 

From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
Behalf Of alpdhuez
Sent: 25 January 2010 06:45
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Smallest module file sizes possible...

 

  

Hi,
I am trying to get my swc/swf file sizes to be as small as possible.
Currently my site has a main swf that acts as the shell of navigation
& loads modules for each page. I have switched the main and
module SWFs to use RSLs, this has helped. Now I am looking at the size
of swc
libraries that are included in the main and module SWFS. Ideally I would
like to make the module SWFs as small as possible so that the page
loading is fast. We have a nice PreLoader, so we don't mind making the
users wait for the login if the main.swf is fatter.

My question is, if I used -compiler.include-libraries for the common swc
library references in the main swf, then used
-compiler.external-library-path in the module swfs, should this work?

So I've tried it. The main.swf goes from ~800kb to 1.6kb is larger, and
the module SWFs are about abou ~100kb but I get class not found
errors when the module.swf's load. Is this even possible? Should I debug
this more or is there a better setup?

thanks in advanced.
-al



Reply via email to