How to optimize SWF file if it contains ActionScripts

First of we would like to recommend you to view the User Manual for Flash Optimizer. As can be derived from User Manual, Scales optimization mechanism places the whole movie in one movie clip and reduces its size by simplifying most procedures and functions, recommended to be used only when Shapes and Morphs work properly for you movie and the positive compression is obvious. 

So in order to avoid ActionScript losses disable Scales optimization.