Flash compiles your AS classes into bytecode (instructions that the Flash player can read and understand) and places this bytecode inside your SWF file.
When you can multiple SWF files in your application that use the same classes, the bytecode for these classes is included in every SWF file.
So, for example, you have three classes, A, B and C and three SWF files SWF 1, SWF 2 and SWF 3. The compiled sizes of classes A, B and C are given below (this is the size of the bytecode that is generated)
A: 20kb
B: 15kb
C: 35kb
SWF 1 uses class A and B
SWF 2 uses class A, B and C
and SWF 3 uses class A and C
Now think about the size of your application. Assuming for a second that these are the only classes used by the SWFs:
Size of SWF A = 20kb + 15kb = 35kb
Size of SWF B = 20kb + 15kb + 35kb = 70kb
Size of SWF C = 20kb + 35kb = 55kb
Total size of application before Optimizer = 35kb + 70kb + 55kb = 160kb.
Now, what Optimizer does is it goes into each SWF, takes out the bytecode for the classes and makes a SWF out of each class. It then makes sure that each class is included *only once* for each application.
So, the total size of our fictitious application after Optimizer would be equal to the sum of the sizes of the classes or:
20kb + 15kb + 35kb = 70kb.
So, in this fictitious example, Optimizer would reduce the size of your application from 160kb to 70kb.
That, in a nutshell, is how Optimizer works!
The Ariaware Optimizer Explained (Simply!) article by Aral Balkan, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial 2.0 UK: England License.

=”#E6F2F2
http://www.flashant.org/in [...]