避免Flex RSL重复load 提高module加载性能
本文编译后的补丁下载链接 http://download.csdn.net/source/1908278
多模块应用,每加载一个模块都会重复加载模块所使用的RSL,现在增加一个
private static var loadedRSLs:Dictionary = new Dictionary(); 来保存是否已加载
mx.core.RSLListLoader
////////////////////////////////////////////////////////////////////////////////
//
// ADOBE SYSTEMS INCORPORATED
// Copyright 2007 Adobe Systems Incorporated
// All Rights Reserved.
//
// NOTICE: Adobe permits you to use, modify, and distribute this file
// in accordance with the terms of the license agreement accompanying it.
// 修改SDK代码免费RSL重复加载,提升模块加载性能
//
////////////////////////////////////////////////////////////////////////////////
package mx.core
{
import flash.events.IEventDispatcher;
import flash.events.Event;
import flash.utils.Dictionary;
[ExcludeClass]
/**
* @private
* Utility class for loading a list of RSLs.
*
* <p>A list of cross-domain RSLs and a list of regular RSLs
* can be loaded using this utility.</p>
*/
public class RSLListLoader
{
//--------------------------------------------------------------------------
//
// Constructor
//
//--------------------------------------------------------------------------
/**
* Constructor.
*
* @param rslList Array of RSLs to load.
* Each entry in the array is of type RSLItem or CdRSLItem.
* The RSLs will be loaded from index 0 to the end of the array.
*/
public function RSLListLoader(rslList:Array)
{
super();
this.rslList = rslList;
}
//--------------------------------------------------------------------------
//
// Variables
//
//--------------------------------------------------------------------------
/**
* @private
* The index of the RSL being loaded.
*/
private var currentIndex:int = 0;
/**
* @private
* The list of
相关文档:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal">
<mx:Panel width="392" height="300" layout="absolute">
<mx:Label x="19" y="10" text="{user}" width="171" height="20"/>
<mx ......
Flex Builder 3.0正式版:
http://download.macromedia.com/pub/flex/flex_builder/FB3_win.exe
或
http://www.adobe.com/cfusion/tdrc/index.cfm?product=flex
或
http://trials.adobe.com/Applications/Flex/FlexBuilder/3/FB3_WWEJ_Plugin.exe
AIR1.0 正式版:
http://airdownload.adobe.com/air ... ob ......
Flex支持的样式设置方式
1.直接使用CSS文件,系统默认使用default.css
<mx:Style source=“style.css”/>
2.使用<mx:Style>标签
3.使用style设计器(->MXML)
4.使用对象的getStyle( )和setStyle( )
5.使用StyleManager类
主题是一套配置完成的样式风格
Flex提供的几种主题,文件类型.swc
......
一、国外站点
1.资源 类
Adobe Flex 2 Component Explorer : 官方的,展示了各种组件 的用法 ,入门 必看。
CFlex :很好的一个Flex资源站点,包括教程 ,新闻,资源站点…… 只是页面有点杂乱,大家一般看右边那一栏就行了。
FlexBox :一个收集 了网上很多开源 组件的站点,是进阶学习 的好帮手。
Flex ......