some tips of flex compiler
flex library project : create swf , not swc , code: -locale=en_US -directory=true -output=../bin/
create zh_CN language package : bin\compc -locale=zh_CN -source-path=frameworks/projects/framework/bundles/zh_CN/src -include-resource-bundles=collections,containers,controls,core,effects,formatters,logging,SharedResources,skins,states,styles,validators
-output=frameworks/locale/zh_CN/framework_rb.swc
相关文档:
<![CDATA[
Flex中的键盘事件
要在Flex中响应键盘输入,只需注册keyDown事件即可。
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" keyDown="OnKeyDown(event)">
<mx:Script>
......
Flex应用开发过程中如需要灵活的在不同组件(如A与B,父与子)之间响应事件,传递参数等功能时就会使用自定义事件(Event)机制,下面通过一个事例分七步,通过自定义Event和EventDispatcher两种机制实现事件交互和参数传递;
事例描述: 有一个父亲“parentApp.mxml&rd ......
/**
* @author:ycccc8202
* @用途:注册事件进行传递参数的代理类
* @date:2007.8.26
* @example:
* import com.ycccc.utils.JEventDelegate
stage.addEventListener(MouseEvent.MOUSE_DOWN,JEventDelegate.create(mouseDownHandler,"a","b"));
function mouseDownHandler(e:MouseEvent,...arg) {
trace(e)
......
<?xml version="1.0"?>
<!-- charts/MemoryGraph.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
initialize="initTimer()">
<mx:Script>
<!--[CDATA[
import flash.utils.Timer;
import flash.events.TimerEve ......
<?xml version="1.0"?>
<!-- charts/StandardEffectTriggers.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
creationComplete="init()">
<mx:Script>
<!--[CDATA[
import mx.collections.ArrayCollection;
import mx ......