Why does my SWF file size not decrease when reduci

2019-07-18 21:21发布

问题:

Often I find if my SWF file size is on the large side, when deleting media altogether or perhaps deleting and re-inserting compressed versions of images, sound etc, it has little or no effect on the resulting SWF's file size. I have tried deleting the SWF to allow Flash to recreate it from scratch but it makes no difference. Has anybody else experienced this and/or know of a solution? Thanks.

回答1:

Make sure you are deleting all your references to the files in your library. For example, if you have a linked asset (i.e. one that is being exported for use in actionscript), even if you don't have that asset on the stage, it will be compiled with the swf. Also, when you delete items from the FLA, use File > Save and Compact ... this cleans up your file and optimizes it. See the follow post for more information...

http://www.derekallard.com/blog/post/flash-save-and-compact/



回答2:

If something in the library was not previously used in the movie then deleting it from the library will not decrease SWF size. This is because when Flash publishes the SWF it only includes elements that are used.

Another thing you mentioned - Flash provides its own image compression. You are better off having a high-quality JPG or PNG in your library then right-click it and select Properties. Then adjust the quality there instead.



回答3:

If you check "generate size report" in your publish settings, you'll get a well detailed report and you'll have a better understanding of what might need to be culled. Long sounds and big images are usually the biggest offenders.

I've found that lowering the sound quality of long background music has little impact on the user's experience while freeing up lots of space.

EDIT: The report, by default, publishes as a text file to the same place as your SWF.



回答4:

you might have a double instance of an object. Make sure you drag from the library multiples mc not bitmap.



回答5:

Are you sure you mean the SWF and not the FLA? I have had experiences where deleting assets from the FLA does not result in a decrease of filesize. I believe it's a bug in Flash, because Saving a new copy (File > Save As) does the trick.

As for reducing file size of the SWF, In my experience, usually if you do not create an instance of an object in the Library, it does not compile it.