actionscript 3 - Flash complied with Flex SDK very big file size -


i had simple flash video player compiling using adobe flash builder , compiling using flex sdk 4.6 . flash filesize 20kb when compling fb . 280kb . know adds swc files swf build , have disabled debug etc instructions provided here http://livedocs.adobe.com/flex/3/html/help.html?content=performance_06.html . possible somehow convert fla components without using mxml ?

here mxml code

<?xml version="1.0" encoding="utf-8"?> <mx:application backgroundcolor="#000000" xmlns:fx="http://ns.adobe.com/mxml/2009"                  xmlns:mx="library://ns.adobe.com/flex/mx" layout="absolute" minwidth="320" minheight="240" creationcomplete="initapp()">     <fx:script>         public function initapp():void{             var p = new video_player(uic);                               }            </fx:script>         <mx:uicomponent id="uic" />       </mx:application> 

video_player.as

....import statements public class video_player{               private var uic:uicomponent         var fullscreen:image;         var rtmpapplication:string;         var streamname:string;         public function video_player(_uic:uicomponent) {             uic=_uic;             if (flexglobals.toplevelapplication.parameters.hasownproperty("applicationname")) {                 rtmpapplication=flexglobals.toplevelapplication.parameters.applicationname;             }             if (flexglobals.toplevelapplication.parameters.hasownproperty("streamname")) {                 streamname=flexglobals.toplevelapplication.parameters.streamname;             }                    vplayer=new video(playerwidth,playerheight);             uic.addchild(vplayer);             init();                  }          public function init(){          //add fullscreen image in flash top right , , event handler          //code connect live appliction , play video using netconnection , netstream         }  } 

is there way around ?

thanks

also have added option -static-link-runtime-shared-libraries=true wont download runtime . without flash size 49kb

by setting above option, have told compiler include of flex framework classes (that used application) in application swf. swf grows 49kb 280kb.

this "rsl" thing (runtime shared library) @reboog711 , talking about. if use flex rsl's, of flex framework code not included in application swf. flex framework rsl's signed adobe , can cached flash player. using them preferable. (note: i'm assuming still works apache flex)

finally, wish reiterate in flash builder there 2 basic kind of projects can create: flex project, actionscript project. i'm ignoring mobile options, same applies them:

an actionscript project will, in general, result in smaller swf because not relying on of flex framework classes. sounds make video player app smaller (closer 20kb size had) if create actionscript project.


Comments

Popular posts from this blog

java - Run a .jar on Heroku -

java - Jtable duplicate Rows -

validation - How to pass paramaters like unix into windows batch file -