[flexcoders] Preloader in a big shared library, bad idea?

2008-08-22 Thread Baz
Hi,

I have a Flex Library Project that is the foundation for all other flex
projects in our department. It includes complex mxml components, themes,
fonts, images, assets, etc. - heavy stuff. I am now working on a custom
preloader that I would like all the applications to share and use. The
question is, should I create separate Flex Library Project just for the
preloader to keep the size at an absolute minimum, or is flex capable of
loading only the preloader bits during preloading if I include it in my big
fat library?

Thanks,
Baz


Re: [flexcoders] Preloader in a big shared library, bad idea?

2008-08-22 Thread Doug McCune
Only what you use in your app will be linked into the SWF, so if the
preloader is all that you use then none of the other bloat will make it into
the SWF file. So your library SWC might be 5 megs, but if all you use is the
tiny preloader then your swf file won't be big... well, unless you think all
Flex swfs are big... :)

Doug

On Fri, Aug 22, 2008 at 1:57 PM, Baz [EMAIL PROTECTED] wrote:

   Hi,

 I have a Flex Library Project that is the foundation for all other flex
 projects in our department. It includes complex mxml components, themes,
 fonts, images, assets, etc. - heavy stuff. I am now working on a custom
 preloader that I would like all the applications to share and use. The
 question is, should I create separate Flex Library Project just for the
 preloader to keep the size at an absolute minimum, or is flex capable of
 loading only the preloader bits during preloading if I include it in my big
 fat library?

 Thanks,
 Baz



  



Re: [flexcoders] Preloader in a big shared library, bad idea?

2008-08-22 Thread Baz
Thanks Doug,

Lets say that a new application links to my 5mb library and at one point or
another it ends up using 3mb worth of components, including the tiny
preloader. At the time of preloading, does it only load the 5kb needed to
preload, even though later on it needs 3mb? Or does it load the whole 3mb,
then run the preloader? If it is the latter, then I clearly need a separate
preloader library because it doesn't make sense to load 3mb to then run a
loader.

Cheers,
Baz



On Fri, Aug 22, 2008 at 2:13 PM, Doug McCune [EMAIL PROTECTED] wrote:

   Only what you use in your app will be linked into the SWF, so if the
 preloader is all that you use then none of the other bloat will make it into
 the SWF file. So your library SWC might be 5 megs, but if all you use is the
 tiny preloader then your swf file won't be big... well, unless you think all
 Flex swfs are big... :)

 Doug


 On Fri, Aug 22, 2008 at 1:57 PM, Baz [EMAIL PROTECTED] wrote:

   Hi,

 I have a Flex Library Project that is the foundation for all other flex
 projects in our department. It includes complex mxml components, themes,
 fonts, images, assets, etc. - heavy stuff. I am now working on a custom
 preloader that I would like all the applications to share and use. The
 question is, should I create separate Flex Library Project just for the
 preloader to keep the size at an absolute minimum, or is flex capable of
 loading only the preloader bits during preloading if I include it in my big
 fat library?

 Thanks,
 Baz




  



Re: [flexcoders] Preloader in a big shared library, bad idea?

2008-08-22 Thread Doug McCune
aha, I see. I think you should be good to go. As far as I know, the
preloader will get loader first and that will get added to the stage and run
while the rest of the SWF loads. Just make sure you don't use any huge
classes within your Preloader (ie don't use UIComponent or any Flex controls
in the preloader).

Doug

On Fri, Aug 22, 2008 at 2:53 PM, Baz [EMAIL PROTECTED] wrote:

   Thanks Doug,

 Lets say that a new application links to my 5mb library and at one point or
 another it ends up using 3mb worth of components, including the tiny
 preloader. At the time of preloading, does it only load the 5kb needed to
 preload, even though later on it needs 3mb? Or does it load the whole 3mb,
 then run the preloader? If it is the latter, then I clearly need a separate
 preloader library because it doesn't make sense to load 3mb to then run a
 loader.

 Cheers,
 Baz



 On Fri, Aug 22, 2008 at 2:13 PM, Doug McCune [EMAIL PROTECTED] wrote:

   Only what you use in your app will be linked into the SWF, so if the
 preloader is all that you use then none of the other bloat will make it into
 the SWF file. So your library SWC might be 5 megs, but if all you use is the
 tiny preloader then your swf file won't be big... well, unless you think all
 Flex swfs are big... :)

 Doug


 On Fri, Aug 22, 2008 at 1:57 PM, Baz [EMAIL PROTECTED] wrote:

   Hi,

 I have a Flex Library Project that is the foundation for all other flex
 projects in our department. It includes complex mxml components, themes,
 fonts, images, assets, etc. - heavy stuff. I am now working on a custom
 preloader that I would like all the applications to share and use. The
 question is, should I create separate Flex Library Project just for the
 preloader to keep the size at an absolute minimum, or is flex capable of
 loading only the preloader bits during preloading if I include it in my big
 fat library?

 Thanks,
 Baz