3 Replies Latest reply on Feb 20, 2008 1:17 AM by robs72

    Why are SWF files generated so large?

    Bret_Patterson
      The SWF files generated by Flex 2 are orders of magnitude bigger than those generated by Flash MX 2004 Professional. I am comparing trial versions of both for a website. A large portion of the target audience is still on 28.8k and 56k modems, and Flex's 120k BASE SWF hello world program is too large to even break it up into components and load on demand or in the background. Flash MX 2004 I could create a really small 30k or 22k SWF that loaded the main page fast and then streamed the other applications in the background to prep the browser cache.

      Am I missing something in Flex 2 that can get it to generate smaller files?
        • 1. Re: Why are SWF files generated so large?
          ncr100
          If you use the plain Actionscript Project then you get a 1kb SWF.

          Unfortunately, the extra stuff in the files is all the mx.* code used typically through mxml (see C:\Program Files\Adobe\Flex Builder 2 Plug-in\Flex SDK 2\frameworks\source\mx).

          It's too bad Macrodobe couldn't somehow figure a way to build that into the 2mb+ flash player EXE .. different mx.* versions I guess.

          Writing custom components might be a workaround for the 113kb minimum swf size.
          • 2. Re: Why are SWF files generated so large?
            inlineblue Level 1
            The thing that irks me is that all during the Beta, Adobe kept saying how it's a beta release and they haven't implemented all optimizations/compression and that the SWFs will be much smaller in the release version. Well, my SWFs from Beta 3 and the release are pretty much the same size. Sigh.
            • 3. Re: Why are SWF files generated so large?
              robs72
              Hi,

              Sorry to drag this old thread up but I've run in to this now. Is there anyway to rework an existing project to reduce the basic overhead? I don't really understand what's meant by 'plain Actionscript Project', I did a test, New->Actionsript Project which created a little package script, but how do you get from that to an mxml file?!

              quote:

              Originally posted by: ncr100
              If you use the plain Actionscript Project then you get a 1kb SWF.

              Unfortunately, the extra stuff in the files is all the mx.* code used typically through mxml (see C:\Program Files\Adobe\Flex Builder 2 Plug-in\Flex SDK 2\frameworks\source\mx).

              It's too bad Macrodobe couldn't somehow figure a way to build that into the 2mb+ flash player EXE .. different mx.* versions I guess.

              Writing custom components might be a workaround for the 113kb minimum swf size.



              Cheers,
              Rob