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. iOS开发中控制器切换方式Modal

    简介 在iPhone开发中 Modal是一种常见的切换控制器的方式 默认是从屏幕底部往上弹出,直到完全盖住后面的内容为止 在iPad开发中 Modal的使用频率也是非常高的 对比iPhone开发,Mo ...

  2. adb not responding. if you'd like to

    在安装genymotion后启动工程报此错误. 解决方案:把其他虚拟机删掉,然后用genymotion新建一个,启动工程OK.

  3. 关于HTTP_CLIENT_IP,HTTP_X_FORWAR

    HTTP_CLIENT_IP:可通过http头伪造HTTP_X_FORWARDED_FOR:可通过http头伪造REMOTE_ADDR:可能是用户真实IP也可能是代理IP 服务端获取IP地址 http ...

  4. [Unity]背包效果-使用NGUI实现物品的拖拽效果Drag

    背包效果-使用NGUI实现物品的拖拽效果Drag 效果实现如图 对象层级关系图 PacketCell - Right 对象作为单元格背景 PacketContainer 对象作为单元格容器 Packe ...

  5. SQLSERVER设置行号

    select row_number()over(order by columnname)as rownum,* from tablename 按照columnname列进行排列

  6. Unity3d/2d手机游戏开发第二版 (金玺曾) 随书资源

    http://pan.baidu.com/s/1c0xpn4s Unity3d2d手机游戏开发配书资源文件.rar 1.36G 书上的链接坏掉了,我在论坛上面买了一份,放这分享给买了书找不到资源的同学 ...

  7. MediaScanner

    http://blog.csdn.net/hellofeiya/article/details/8255898 http://www.cnblogs.com/halzhang/archive/2011 ...

  8. Analyzing the Meaning of Sentences

    1. How can we represent natural language meaning so that a computer can process these representation ...

  9. [iOS] 响应式编程开发-ReactiveCocoa(一)

    什么是响应式编程 响应式编程是一种面向数据流和变化传播的编程范式.这意味着可以在编程语言中很方便地表达静态或动态的数据流,而相关的计算模型会自动将变化的值通过数据流进行传播. 例如,在命令式编程环境中 ...

  10. form表单传递下拉框的Value和Text值,不适用Jquery传递

    同时获取下拉框的Value和Text值的解决办法:添加一个<input type="text" >文本框,用户选中一项后就将该项的value值给他 然后接受页面获取该文 ...