Flash complied with Flex SDK very big file size
I had a simple flash video player I was compiling using Adobe Flash
Builder , but now I am compiling it using Flex SDK 4.6 . Flash filesize
was 20KB when I was compling with FB . Now its 280KB . I know that it adds
some swc files to swf build , I have disabled debug etc instructions
provided here
http://livedocs.adobe.com/flex/3/html/help.html?content=performance_06.html
. Is it possible to somehow convert fla components without using mxml ?
Here is my 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 , and event handler
//Code to connect to live appliction and play video using
NetConnection and NetStream
}
}
Is there any way around this ?
Thanks
No comments:
Post a Comment