6 Replies Latest reply on Mar 4, 2010 4:04 PM by pauland

    Flex vs Flash 8 operation

    landogilator

      I have been using Flash Professional 8 for several years (largely actionscript) and wanting to upgrade to Flex.

      However, I have concerns about the size of the resulting .swf files with Flex.

       

      I tried an experiment. Using Flash 8, I made a simple movie with a single text box, published and the .swf = 28kbytes.

      Same thing with Flex except .swf = 280kbytes. I added a list component to both and Flash .swf = 52kb, Flex .swf = 400kb.

       

      So, I am puzzled. What is it about Flex that is causing the .swf to swell to approx. 8-10x the size of Flash 8?

      Are more of the "controls" contained in the .swf with Flex? I must admit that I am ignorant about the operation of the Flash player other than it

      interprets the byte code. And I realize that some optimization can be obtained with Flex but I do not think this is the fundamental issue.

       

      Can anyone educate me as to how Flex works from the runtime(player) perspective? And how it differs from Flash 8? Why am I seeing significantly

      larger .swf files?

        • 1. Re: Flex vs Flash 8 operation
          Gregory Lafrance Level 6

          Probably due to Flex framework classes and supporting classes. Shouldn't be a problem for typical users, who no doubt will have broadband or DSL.

           

          If this post answers your question or helps, please mark it as such.


          Greg Lafrance - Flex 2 and 3 ACE certified

          www.ChikaraDev.com

          Flex / AIR Development, Training, and Support Services

          • 2. Re: Flex vs Flash 8 operation
            landogilator Level 1

            Thanks Greg. It helps although I still would like to understand it a bit more.

             

            The bottom line is that the Flex Framework requires a larger file size to do what it does.

             

            My issue with a larger file is not so much the time it takes to download, but the memory consumption on

            the server side. I am using an embedded application server where every byte counts in the file system. No Gbyte harddrives available.

            • 3. Re: Flex vs Flash 8 operation
              Gregory Lafrance Level 6

              If you are creating small apps, I would stay with Flash. If you are creating more substantial webapps, then the increased file size is somewhat unavoidable, unless you go with AJAX, but mid to long-term that would not be as good a choice as Flex.

               

              If this post answers your question or helps, please mark it as such.


              Greg Lafrance - Flex 2 and 3 ACE certified

              www.ChikaraDev.com

              Flex / AIR Development, Training, and Support Services

              1 person found this helpful
              • 4. Re: Flex vs Flash 8 operation
                pauland Level 4

                Even if the Flex libraries are too heavy for your situation, you could still use AS3 and avoid the Flex framework altogether (or indeed just carry on as you are).

                1 person found this helpful
                • 5. Re: Flex vs Flash 8 operation
                  landogilator Level 1

                  Which leads to another question, pauland...perhaps Flash CS4/AS3 is a better fit? I really had my heart set on the charting features.

                  Will have to download the trial CS4 and give it a try. Thanks.

                  • 6. Re: Flex vs Flash 8 operation
                    pauland Level 4

                    Just bear in mind that CS5 is due to appear reasonably soon, so that may be something to remember. A  lot of people on the forums use Flex for Actionscript development and other IDEs besides CS4.