易截截图软件、单文件、免安装、纯绿色、仅160KB

flex IModuleInfo 注册事件失效问题

在flex 开发项目中,很多都会使用Module来减少application加载过大的问题。Module也确实解决了这个问题。
但是在使用Module过程中需要注意的一点 非常关键的一点那就是 定义一个IModuleInfo的时候 一定要记得把定义成全局变量哦。不然就会出现 第一次加载不了 二第二次 第三次。。。。都可以的效果。不注意这点找死了都找不出什么原因来。
为什么要定义成全局的。
原因看了下面的英文就知道了:
References to IModuleInfo must be maintained to keep the event listeneres alive. If the IModuleInfo is defined in function local scope the event listeners may get garbage collected.
google 的翻译是这样说的:
以IModuleInfo参考必须保持保持事件listeneres活着。如果IModuleInfo定义在函数的局部范围的事件监听器可能会被垃圾收集。
也就是说 在使用IModuleInfo 过程中始终要保持IModuleInfo 变量的存在,不然第一次就会被当做垃圾处理,才使得他注册事件第一次执行总是失效的问题。


相关文档:

flex学习 flex读取xml文件

源xml文件
 <?xml version="1.0" encoding="iso-8859-1"?>
<books>
<stock>
<name>The Picasso Code</name>
<author>Dan Blue</author>
<category>Fiction</category>
<description>Cubist paintings reveal a secret society of people ......

10 Tips for Flex Application Performance

We're going to keep this post lean and mean, and get down to
business with 10 Tips that will keep your Flex applications fast, lean,
and responsive.
Rule # 1: Clean up after yourself
In general, it is good practice to maintain clean code. Not only
in the sense of having properly formatted and ......

在FLEX Panel的Title上添加控件实例

一、自定义Panel组件
package test
{
    import mx.containers.Panel;
    import mx.core.UIComponent;
   
    /**
    * 自定义Panel
    * **/
    public class MyPanel extends Panel
  ......

Flex Autocomplete组件的使用实例

测试文件代码如下:导入com.hillelcoren.components包
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
 xmlns:mx="http://www.adobe.com/2006/mxml"
 xmlns:hc="com.hillelcoren.components.*"
 xmlns:classes="com.hillelcoren.components.autoComplete.classes.*"
 xmlns:l ......

flex xmlsocket学习

1、XMLSocket对象简介
在概述里,已经提到过了Flash里的XMLSocket对象,它是实现Falsh和服务器Socket间
通信的核心。它允许包含Flash应用的浏览器与服务端建立socket连接,之后Flash应用与服务端就可以相互发送XML数据,而且在一个
socket连接建立之后,在该连接上传送的数据量是没有限制的,直到socket连接关闭。XMLSoc ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号