View Full Version : Do unused library items get compiled in the swf?
shane-c
05-13-2007, 03:48 PM
I'm doing some "clean up" on a Flash file for size optimization, and it has a ton of symbols and graphics in the library that aren't actually used in the movie. Aside from just general organization, would it be worthwhile for me to remove them from the library before publishing, or does the swf compiler automatically disregard unused library items (they are not linked for AS, by the way)?
Krilnon
05-13-2007, 03:52 PM
The unlinked, unused library items shouldn't increase the file's size at all.
shane-c
05-13-2007, 04:00 PM
Ok, well I actually just tested it out, and YES - getting rid of excess library items helped out the file size a ton.
dthought
05-13-2007, 07:32 PM
If you generate a file size report (in File / Publish Options | Flash) it will show you where your file size is going.
Also, the library has a 'select unused items' option... it may be that you deleted something which was used..?
darth
05-14-2007, 03:32 AM
no.
dthought
05-14-2007, 07:04 AM
Actually, there is a partial truth to this. I've noticed if I have a bloated FLA file, and then I run Save and Compact, the SWF also loses a small bit of size on next compile, even with no other changes.
Strange, but true.
shane-c
05-14-2007, 01:52 PM
Well, since I didn't put together the whole Flash file myself, there is a chance that some of the items I deleted from the library were "hidden" somewhere... But I guess I can't know for sure. Basically, I was dealing with a movie that used un-optimized images. I optimized all the images and got the size of the swf down from 3mb to about 1.9mb. Then I deleted all of the un-optimized bitmaps from the library, and the swf again decreased in size, all the way down to about 700kb. After some more clean-up I got it down to 376kb.
So, like I said, unless I missed something, it DID in fact seem to help.
bzouchir
05-16-2007, 11:52 AM
Bit off topic but that goes for cleaning and optimizing files sizes,
with the .fla files, that's using Flash 8 haven't tried CS3 yet, when u're working on a file for quite some time, and you keep overwriting the file each time you save, I''m not sure what flash is adding each time besides ur progress, because if you open that same file and "save it as" a brand new one, the .fla size decreases dramatically!
dthought
05-16-2007, 07:35 PM
That's what Save and Compact is for, bzouchir.
The reason that FLA files bloat is, from my understanding, that Flash does "incremental" saves rather than complete rewritten saves. So if you delete a 50MB sound file in your library, Flash marks it as "deleted", but the data is still in the FLA file until you compact or save as.
Microsoft Office does a similar thing, if I remember rightly.
bzouchir
05-20-2007, 07:08 PM
and I was wondering why were my files increasing in size almost exponentially!
Thanks for the info, I never noticed that Save and Compact in flash 8! :S
That’s what happens when u’re a shortcut freak! :stare: “File” tab is something I haven’t opened for years!
cheers :pleased:
vBulletin® v3.8.4, Copyright ©2000-2010, Jelsoft Enterprises Ltd.