Flex4 flash builder保留MXML转换的AS代码

项目->属性->Flex编译器 | 附加的编译参数 加上 -keep

生成的Test005-interface.as文件:

package
{
import flash.accessibility.*;
import flash.debugger.*;
import flash.display.*;
import flash.errors.*;
import flash.events.*;
import flash.external.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.printing.*;
import flash.profiler.*;
import flash.system.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
import mx.binding.*;
import mx.core.ClassFactory;
import mx.core.DeferredInstanceFromClass;
import mx.core.DeferredInstanceFromFunction;
import mx.core.IDeferredInstance;
import mx.core.IFactory;
import mx.core.IFlexModuleFactory;
import mx.core.IPropertyChangeNotifier;
import mx.core.mx_internal;
import mx.filters.*;
import mx.styles.*;
import spark.components.Application;
import spark.components.Label;
import spark.components.Application;
import mx.controls.DateField;
import mx.controls.Tree;
import mx.collections.ArrayList;
import spark.components.gridClasses.GridColumn;
import Object;
import spark.components.DataGrid;
import spark.components.Button; public class Test005 extends spark.components.Application
{
public function Test005() {} mx_internal var _bindings : Array;
mx_internal var _watchers : Array;
mx_internal var _bindingsByDestination : Object;
mx_internal var _bindingsBeginWithWord : Object; }}

生成的Test005-generated.as文件:

/**
* Generated by mxmlc 4.0
*
* Package:
* Class: Test005
* Source: D:\Thinkpad\adobeTraining\f4dria\_ws\TestFlex4\src\Test005.mxml
* Template: flex2/compiler/mxml/gen/ClassDef.vm
* Time: 2015.11.26 09:32:15 CST
*/ package
{ import flash.accessibility.*;
import flash.debugger.*;
import flash.display.*;
import flash.errors.*;
import flash.events.*;
import flash.external.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.printing.*;
import flash.profiler.*;
import flash.system.*;
import flash.text.*;
import flash.ui.*;
import flash.utils.*;
import flash.xml.*;
import mx.binding.*;
import mx.collections.ArrayList;
import mx.controls.DateField;
import mx.controls.Tree;
import mx.core.ClassFactory;
import mx.core.DeferredInstanceFromClass;
import mx.core.DeferredInstanceFromFunction;
import mx.core.IDeferredInstance;
import mx.core.IFactory;
import mx.core.IFlexModuleFactory;
import mx.core.IPropertyChangeNotifier;
import mx.core.mx_internal;
import mx.filters.*;
import mx.styles.*;
import spark.components.Application;
import spark.components.Button;
import spark.components.DataGrid;
import spark.components.Label;
import spark.components.gridClasses.GridColumn; [Frame(extraClass="_Test005_FlexInit")] [Frame(factoryClass="_Test005_mx_managers_SystemManager")] // begin class def
public class Test005
extends spark.components.Application
{ // instance variables // type-import dummies // constructor (Flex display object)
/**
* @private
**/
public function Test005()
{
super(); mx_internal::_document = this; // layer initializers // properties
this.mxmlContentFactory = new mx.core.DeferredInstanceFromFunction(_Test005_Array1_c); // events } /**
* @private
**/
private var __moduleFactoryInitialized:Boolean = false; /**
* @private
* Override the module factory so we can defer setting style declarations
* until a module factory is set. Without the correct module factory set
* the style declaration will end up in the wrong style manager.
**/
override public function set moduleFactory(factory:IFlexModuleFactory):void
{
super.moduleFactory = factory; if (__moduleFactoryInitialized)
return; __moduleFactoryInitialized = true; // our style settings // ambient styles
mx_internal::_Test005_StylesInit(); } // initialize()
/**
* @private
**/
override public function initialize():void
{ super.initialize();
} // scripts
// end scripts // supporting function definitions for properties, events, styles, effects
private function _Test005_Array1_c() : Array
{
var temp : Array = [_Test005_Button1_c(), _Test005_Label1_c(), _Test005_DataGrid1_c(), _Test005_DateField1_c(), _Test005_Tree1_c()];
return temp;
} private function _Test005_Button1_c() : spark.components.Button
{
var temp : spark.components.Button = new spark.components.Button();
temp.x = 122;
temp.y = 94;
temp.label = "按钮";
if (!temp.document) temp.document = this;
return temp;
} private function _Test005_Label1_c() : spark.components.Label
{
var temp : spark.components.Label = new spark.components.Label();
temp.x = 122;
temp.y = 149;
temp.text = "标签";
if (!temp.document) temp.document = this;
return temp;
} private function _Test005_DataGrid1_c() : spark.components.DataGrid
{
var temp : spark.components.DataGrid = new spark.components.DataGrid();
temp.x = 245;
temp.y = 94;
temp.requestedRowCount = 4;
temp.columns = _Test005_ArrayList1_c();
temp.typicalItem = {dataField1: "示例数据", dataField2: "示例数据", dataField3: "示例数据"};
temp.dataProvider = _Test005_ArrayList2_c();
if (!temp.document) temp.document = this;
return temp;
} private function _Test005_ArrayList1_c() : mx.collections.ArrayList
{
var temp : mx.collections.ArrayList = new mx.collections.ArrayList();
temp.source = [_Test005_GridColumn1_c(), _Test005_GridColumn2_c(), _Test005_GridColumn3_c()];
return temp;
} private function _Test005_GridColumn1_c() : spark.components.gridClasses.GridColumn
{
var temp : spark.components.gridClasses.GridColumn = new spark.components.gridClasses.GridColumn();
temp.dataField = "dataField1";
temp.headerText = "列 1";
return temp;
} private function _Test005_GridColumn2_c() : spark.components.gridClasses.GridColumn
{
var temp : spark.components.gridClasses.GridColumn = new spark.components.gridClasses.GridColumn();
temp.dataField = "dataField2";
temp.headerText = "列 2";
return temp;
} private function _Test005_GridColumn3_c() : spark.components.gridClasses.GridColumn
{
var temp : spark.components.gridClasses.GridColumn = new spark.components.gridClasses.GridColumn();
temp.dataField = "dataField3";
temp.headerText = "列 3";
return temp;
} private function _Test005_ArrayList2_c() : mx.collections.ArrayList
{
var temp : mx.collections.ArrayList = new mx.collections.ArrayList();
temp.source = [{dataField1: "数据1", dataField2: "数据1", dataField3: "数据1"}, {dataField1: "数据2", dataField2: "数据2", dataField3: "数据2"}, {dataField1: "数据3", dataField2: "数据3", dataField3: "数据3"}, {dataField1: "数据4", dataField2: "数据4", dataField3: "数据4"}];
return temp;
} private function _Test005_DateField1_c() : mx.controls.DateField
{
var temp : mx.controls.DateField = new mx.controls.DateField();
temp.x = 245;
temp.y = 231;
if (!temp.document) temp.document = this;
return temp;
} private function _Test005_Tree1_c() : mx.controls.Tree
{
var temp : mx.controls.Tree = new mx.controls.Tree();
temp.x = 490;
temp.y = 94;
if (!temp.document) temp.document = this;
return temp;
} // initialize style defs for Test005 mx_internal var _Test005_StylesInit_done:Boolean = false; mx_internal function _Test005_StylesInit():void
{
// only add our style defs to the style manager once
if (mx_internal::_Test005_StylesInit_done)
return;
else
mx_internal::_Test005_StylesInit_done = true; var style:CSSStyleDeclaration;
var effects:Array; var conditions:Array;
var condition:CSSCondition;
var selector:CSSSelector; styleManager.initProtoChainRoots();
} // embed carrier vars
// end embed carrier vars // end class def
} // end package def
}

Flex4 flash builder保留MXML转换的AS代码的更多相关文章

  1. Actionscript,AS3,MXML,Flex,Flex Builder,Flash Builder,Flash,AIR,Flash Player之关系

    转自zrong's blog:http://zengrong.net/post/1295.htm ActionScript ActionScript通常简称为AS,它是Flash平台的语言.AS编写的 ...

  2. Flex4/Flash开发在线音乐播放器 , 含演示地址

    要求 必备知识 本文要求基本了解 Adobe Flex编程知识和JAVA基础知识. 开发环境 MyEclipse10/Flash Builder4.6/Flash Player11及以上 演示地址 演 ...

  3. Adobe Flash Builder 4.7 新功能详解

    Adobe Flash Builder 4.7 Beta终于公开测试了.虽然版本号只增加了.1,增强的新功能可是一点也不含糊.我们一起来看看到底有什么新功能吧!   在我看来,最大的改变是终于提供64 ...

  4. Apache Flex + Adobe Flash Builder环境配置

    在开始学习Flex之前,需要配置开发环境.Apache Flex SDK包含了你开发所需要的东西,当然除了集成开发环境(Integrated Development Environment,IDE). ...

  5. Flash Builder 创建CSS

    1.global 选择器将样式应用于所有控件 Ÿ 在 Flash Builder 中创建新MXML 文件并切换到设计模式 Ÿ 属性视图右侧的外观视图可更改外观 Flash Builder 自动创建CS ...

  6. Web三维技术:Flash Builder+away3d平台搭建(含演示视频)

    转自:http://www.cnblogs.com/beer/archive/2011/07/08/2101492.html 前言:作为页面中实验设备的显示层,需要一个swf作为显示的UI.虽然可以用 ...

  7. (转载)Flash Builder和flashdevelop 常用快捷键

    (转载)http://www.fantxi.com/blog/archives/fb-fd-shortcut/ =========flashdevelopCtrl+B - snippetsctrl+s ...

  8. flash Builder JSON使用实例

    flash Builder JSON 使用说明(转载houdinime) XML虽然强大但有人觉得xml不够简洁,编码和解码也有一定难度,于是21世纪初有人发明了JSON编码,相比xml内容少并且容易 ...

  9. Flash Builder 4的快捷方式和调试技巧

    Flash Builder 4的快捷方式和调试技巧 来自于flex开发人员中心:http://www.adobe.com/cn/devnet/flex/articles/flashbuilder_sh ...

随机推荐

  1. POJ 3683 Priest John's Busiest Day

    2-SAT简单题,判断一下两个开区间是否相交 #include<cstdio> #include<cstring> #include<cmath> #include ...

  2. Python之路:堡垒机实例以及数据库操作

    一.堡垒机前戏 开发堡垒机之前,先学习Python的paramiko模块,该模块基于SSH用于连接远程服务器并执行相关操作. SSHClient 用于连接远程服务器并执行基本命令 基于用户名密码连接: ...

  3. jetty compile

    lifecycle cant been covered, 需要m2e-extra,在elcipse marcketplace找,不是叫做这个名. <parent>上有lifecycle问题 ...

  4. NGUI具有流光效果的UISprite

    之前做过一个流光效果(http://www.cnblogs.com/jietian331/p/4748644.html). 现将其改进一下,与NGUI结合起来,提供一个具有流光效果的组件:UIWalk ...

  5. HDU 2121 Ice_cream’s world II 最小树形图 模板

    开始学习最小树形图,模板题. Ice_cream’s world II Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32 ...

  6. 三、MapReduce学习

    MapReducer是一种编程模型,用于大规模数据集(大于1TB)的并行运算.概念"Map(映射)"和"Reduce(化简)"                  ...

  7. 转化秒数为正规的时间格式{NSString格式的秒数转成NSDate格式后再以NSString形式输出)

    -(NSString*)changeNumToTime:(NSString*)str { NSDate *date = [NSDate dateWithTimeIntervalSince1970:[s ...

  8. bootstrap tab标签页

    <ul id="myTab" class="nav nav-tabs"> <li class="active"> & ...

  9. jstree使用小结(一)

    项目中用到tree结构,使用了jstree做个笔记如下: 1. 官网: http://www.jstree.com/    有时候打不开,那就只能等打得开的时候再看了...O(∩_∩)O [PS: 一 ...

  10. eclipse 如何debug jdk源码(转)

    转:http://blog.csdn.net/cherrycheng_/article/details/51004386 原英文地址:http://stackoverflow.com/question ...