3 Replies Latest reply on Jul 17, 2009 9:21 AM by cemef

    Reducing Flex filesize


      So I'm trying to build an animation with text. I've followed the examples and have been able to build it but the filesize as compared with the same animation built with Flash is enormous. I'd like to know if there are ways to actually decrease the filesize to get it down to roughly the same size.


      I'm trying to figure out how I can leave unused components out and etc. Is there anyway to make each frame of the animation a separate flash file and then have it load one by one when required? And after loading, will these files be cached? From an engineering perspective, Flex is exactly what we want because we can edit the text and etc and have the animations automatically build by themselves. Unfortunately, the filesize is the biggest problem and we might have to ultimately go back to Scriptaculous or something of that nature.


      I'm just wondering if anyone has any thoughts or opinions on this matter.



        • 1. Re: Reducing Flex filesize
          cemef Level 1

          You should take a look at two things:


          1. When compiling Flex project for the final build, don't use neither Run, nor Debug buttons (those green ones at the top), but you should use "Export Release Build" button, that's placed next to them.


          2. Right click on the project name -> properties -> Flex build path -> Library path. There's a combo box that should be saying "Meged into code" by default. Change it into "Runtime Shared Library (RSL)".


          Check out your .swf file now - the one that has been put into the bin-release folder, not the bin-debug folder. It should be much smaller, althoug it's still not the same as you can do with pure Flash.

          You should also be very carefull when using ComboBox or HTTPService objects. They add almost 100 KB to the project - each.

          1 person found this helpful
          • 2. Re: Reducing Flex filesize
            Tereno10 Level 1

            1. I tried that but pretty good at 100kb. The Flash file is at an amazing 13kb! Haha.


            2. I did that as well and that seemed to lower it down significantly but what does that mean for the end-user? When they are first loading it, they have to download the libs as well right? It's just sorta pushing the components into a separate file but as a solution, you're still going to need all files downloaded?

            • 3. Re: Reducing Flex filesize
              cemef Level 1

              Yeah, you're right in both points. From what I know, that's all you can do with Flex. It's adding most of it's framework to the final .swf file, and that's why it's getting so much bigger than the pure Flash's files.


              If you'll find a better why, just let me know, cause I'm gonna definitely use it But I'm affraid that you won't