I have a flex application only used as API of LocalConnection
for JavaScript.
It's working well but the generated SWF file is really big:
- static-link-runtime-shared-libraries=false ~43k
- static-link-runtime-shared-libraries=true ~260k
Both are really big and if static-link-runtime-shared-libraries
is disabled - loading the swf is nearly 5 seconds slower and rendomly I get Error #2046
:(
Compressing and optimizing is enabled, debugging and the preloader is is disabled.
The mxml file only contains the following:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="main()"
width="1" height="1" usePreloader="false">
<mx:Script>
<![CDATA[
import mx.core.FlexGlobals;
import flash.net.LocalConnection;
import flash.external.ExternalInterface;
private var readyCallback:String;
private var debugCallback:String;
private var errorCallback:String;
private var receiveConnection:LocalConnection;
private var receiveCallback:String;
private var postConnection:LocalConnection;
private function main() : void {
// ...
}
// ~100 Lines of code
]]>
</mx:Script>
</mx:Application>
Can someone help me generating a much smaller (and fast loading) swf ?