Thanks for that Chris. I am very new to the whole flash eco system. If this is not the right way to approach the problem, I am very open to suggestions. Coming to the problem in hand, I guess I guess I did not make myself clear. We are trying to lazy load the classes as embedded below presently
[Embed(source="/../moo/foo.swf", symbol="bar")] private var Bar:Class; We have hundreds of swfs like this from which symbols are imported and trying to find each of the individual symbols and their sizes using CS4 will be tedious. Hence, we are trying to write a script to do this. So, looking for a tool which goes through all these swfs, finds all the export for actionscript symbols and gives their sizes so that we can prioritize what to lazy load based on the symbol size. On Sat, Jul 30, 2011 at 10:35 PM, Chris <[email protected]> wrote: > >On Sat, 30 Jul 2011 13:05:08 +0530 > >Abhi <[email protected]> wrote: > > > We have a huge action script project and the initial download swf size > has > > bloated a lot. A lot of classes in the action script files are embedded > > using the embed syntax from swf files while compiling which is one of the > > major contributors to the bloat. We are trying to lazily load the classes > as > > needed and the first step towards the process is in identifying which > > symbols contribute to the bloat. We would like to recursively scan > through > > all our swf files, extract all the symbols marked with "export for action > > script" and find out their sizes and sort them based on their size. This > can > > be done through a script but we want a tool that lets us extract symbols > > from swf and give it's size. Does swf extract allow us to extract symbols > > from swf files which are marked as "export for action script" and give > it's > > corresponding size? > > I'm in no way an AS2/AS3 afficionado but.. ( and forgive me for saying so > do ), the above sounds more than a tad screwy to me!! ;o) > > If you have access to the original source at compile time, why on earth are > you now > expending energy trying to reverse engineer the resulting swf(s), to find > out where > you went wrong? Wouldn't the application of little aforethought and > guesstimation > prior to the compile stage have saved you time and hassle? > > Check out how the import statement really works: > > > http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/2/help.html?content=00000712.html > > since if used correctly, it doesn't add 'bloat' to the swf, and I quote: > > 'If you import a class but don't use it in your script, the class isn't > exported as part of the SWF file. This means you can import large packages > without being concerned about the size of the SWF file; the bytecode > associated with a class is included in a SWF file only if that class is > actually used.' > > Regards, > > > > Chris > -- > <[email protected]> > -- Cheers, Abhi
--------------- SWFTools-common is a self-managed list. To subscribe/unsubscribe, or amend an existing subscription, please kindly point your favourite web browser at:<http://lists.nongnu.org/mailman/listinfo/swftools-common>
