我有一个使用 Adobe Flash Builder 编译的简单 Flash 视频播放器,但现在我使用 Flex SDK 4.6 编译它。使用 FB 编译时,Flash 文件大小为 20KB。现在是 280KB 。我知道它向 swf build 添加了一些 swc 文件,我已禁用此处提供的调试等说明http://livedocs.adobe.com/flex/3/html/help.html?content=performance_06.html。是否可以在不使用 mxml 的情况下以某种方式转换 fla 组件?
这是我的 mxml 代码
<?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 application and play video using NetConnection and NetStream
}
}
有没有办法解决?