Question

Situation
~~~~~~~~
I'm coding an as3 video game and I'm rather surprised when I'm checking the size of my project compared to the compiled swf.

My project size 28 mo. - assets is 26 Mo - src is 2 Mo

When I'm compiling it with embedded images, I get 242 Mo swf. When I'm compiling it without any embedded resource, I get 18 Mo swf.

Question:
~~~~~~~~
How can assets simply embedded in a project goes from 26 Mo to (242 - 18 =)224 Mo ? (I'm looking for a technical answer).

Notes:
~~~~~
I don't have any issue whatsoever concerning runtime. I understand I have to use a loader and not embed big resource in my project, I just want to know why.

Was it helpful?

Solution

Perhaps your assets are somehow getting included multiple times. Luckily, there are some tools out there that can help you figure out what's going on:

  • In Adobe Flash CC (and similarly in other versions) you can go to File -> Publish Settings -> Flash (.swf) -> Advanced and check the box Generate Size Report. This will output some text in the output panel on publish that shows you the sizes and categories of everything in your swf.
  • Or, you could try the Visual Size Report add-on. Never tried it myself, so not sure if it's good or not.
  • If you're using FlashDevelop, and have a .swf as part of a project, you can see some details about its size. Here's an example.
  • Finally, if you're compiling with flex and mxmlc, you can add the -link-report filename option to generate a report that'll help you out.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top