flex项目和组件等
open-source project : Flex
Adobe APIs
主要包含corelib, mappr, flickr, youtube及加密等类库.
http://labs.adobe.com/wiki/index.php/ActionScript_3:resources:apis:libraries
as3awss3lib
与 Amazon S3 交互的 ActionScript 3.0 类库
http://code.google.com/p/as3awss3lib/
as3soundeditorlib
声音编辑类库
http://code.google.com/p/as3soundeditorlib/
as3ds
为游戏开发者整理的 AS3 数据结构
http://code.google.com/p/as3ds/
mecheye-as3-libraries
一组Flash游戏开发的AS3类库。
http://code.google.com/p/mecheye-as3-libraries/
APE
Actionscript的模拟物理引擎API
http://www.cove.org/ape/
As3Crypto
用 AS3 实现的密码系统类库,支持的算法主要包括 RSA,AES,DES,3DES,MD2,MD5,SHA-1,SHA-224,SHA-256 等等
http://crypto.hurlant.com/
FZip
让 AS3 能够加载标准ZIP格式的数据,并能解压其中的文件。
http://codeazur.com.br/lab/fzip/
// 3D相关
ASCOLLADA
一个可以解析Collada文件格式的AS3类 ......
Flex使用Loader和URLRequest加载本地图片示例:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
<![CDATA[
import mx.core.UIComponent;
import mx.controls.Alert;
import flash.display.*;
import flash.net.URLRequest;
var ldr:Loader;
private function Load():void
{
ldr= new Loader();<span id="more-684"></span>
var url:String="tuzi.jpg";
var urlReq:URLRequest=new URLRequest(url);
ldr.load(urlReq);
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
}
private function completeHandler(e:Event):void
{
//mx.controls.Alert("load");
var uc:UIComponent=new UIComponent();
u ......
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="horizontal">
<mx:Panel width="382" height="277" layout="absolute">
<mx:Button x="48" y="37" label="1" width="38" height="23" id="btn1" click="btnClick('1')"/>
<mx:Button x="223" y="81" label="8" width="38" height="23" id="btn8" click="btnClick('8')"/>
<mx:Button x="168" y="81" label="7" width="38" height="23" id="btn7" click="btnClick('7')"/>
<mx:Button x="108" y="81" label=&q ......
(1)Event Listeners
Listening to parent objects does cause memory leaks
e.g.
override protected function mouseDownHandler(…):void {
systemManager.addEventListener(“mouseUp”, mouseUpHandler);
you can:
1.Removing the addEventListener (when dispose).
systemManager.removeEventListener( ......
<!-- -->
<!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;
mso-font-charset:2;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:0 268435456 0 0 -2147483648 0;}
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"\@宋体";
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{mso-style-parent:"";
margin:0cm;
margin-bottom:.0001pt;
text-align:justify;
text-justify:inter-ideograph;
mso-pagination:none;
font-size:10.5pt;
mso-bidi-font-size:12.0pt;
font-family:"Times New Roman";
ms ......
MXML:
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" fontSize="20" initialize="doinit()" mouseOver="getMouseTarget(event)">
<mx:ArrayCollection id="dgArray">
<mx:Object pid="1" name="秦始皇" time="秦" />
<mx:Object pid="2" name="汉高祖" time="汉" />
<mx:Object pid="3" name="唐太宗" time="唐" />
</mx:ArrayCollection>
<mx:Style>
.myTitle{
fontSize: 12;
fontWeight: bolt;
fontFamily: 黑体;
}
</mx:Style>
<mx:Script>
<![CDATA[
import mx.events.MenuEvent;
import mx.events.FlexMouseEvent;
import mx.controls.Menu;
&n ......