避免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
相关文档:
发现了一个Flex中TextInput的一个比较有用的属性restrict(约束,限定),先看下例子:
1,<mx:TextInput id="test_ti" width="160" maxChars="20" restrict="0-9" text="0"/>
这样,这个输入框最多只能输入20个字符,只能输入0到9之间的数字了,你如果输入别的是输入不进去的
2,<mx:TextInput id="test_ti" width="1 ......
<?xml version="1.0" encoding="utf-8"?>
<!-- http://yecon.blog.hexun.com/28902341_d.html -->
<!-- http://www.slsay.com -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
&nb ......
import flash.display.DisplayObject;
import mx.core.Application;
import mx.managers.PopUpManager;
var win:TestWindows= PopUpManager.createPopUp(DisplayObject(Application.application),TitleWindows,true) as TitleWindows;
PopUpManager.centerPopUp(win); ......
一、国外站点
1.资源 类
Adobe Flex 2 Component Explorer : 官方的,展示了各种组件 的用法 ,入门 必看。
CFlex :很好的一个Flex资源站点,包括教程 ,新闻,资源站点…… 只是页面有点杂乱,大家一般看右边那一栏就行了。
FlexBox :一个收集 了网上很多开源 组件的站点,是进阶学习 的好帮手。
Flex ......