避免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"?>
<!-- Simple example to demonstrate the DateTimeAxis class. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
import mx.collections.ArrayCollection;
......
三年前,用过AmfPHP与Flash/Flex
Remoting做过交互,最近接触Python,公司项目用的Flex做前端,所以接触了PyAmf。PyAmf本质上跟AmfPHP是雷同的。都是通
过对AMF协议(ActionScript Message Format)协议的支持来实现对Flash的交互过程。
一、首先,简单的介绍一下AMF协议格式。
AMF是Adobe独家开发出来的通信协议,它采 ......
今天做Flex时碰到flex和java交互的乱码问题,使用HTTPService无论是从Flex端传到Java端,还是反过来都乱码。调查了半天,终于搞定了。
以下是解决方案:
1.Flex端传到Java端
Flex端:encodeURIComponent(comment.text)
使用encodeURIComponent把参数转换为 application/x-www ......
采用Image重复加载图片极大影响性能,并且占用大量内存,下面是我对比验证的代码。
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
initialize="loadImage()">
<m ......