---
title: "flex4 点滴"
author: "牧羊人"
date: "2010-06-07T10:21:36Z"
tags: []
categories: ["Web前端"]
slug: "flex4"
draft: false
lastmod: "2010-06-09T11:30:29Z"
id: 685697
url: "https://wujuncheng.iteye.com/blog/685697"
---

1、由于RemoteObject未实现mx.core.IUIComponent，它必须包含在<declaration>中
2、flex3中自定义控件，加载时直接定义xmlnx:**即可使用。在flex4中，自定义控件，需要加在<fx:Declarations>中，如：
<fx:Declarations>
      <c:MainController id="controler" />
</fx:Declarations>

3、Application的监听或派发事件。
flex3中可以直接用Application.application.addEventListener，在flex中，不能再用此方法，要改为：
FlexGlobals.topLevelApplication.addEventListener(event,func);