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

Flex:上传图片前预览

<?xml version="1.0" encoding="utf-8"?>
<!-- http://yecon.blog.hexun.com/31030831_d.html -->
<!-- http://www.slsay.com -->
<Application name="FileReference_load_test"
xmlns="http://ns.adobe.com/mxml/2009"
xmlns:mx="library:adobe/flex/halo"
xmlns:net="flash.net.*"
layout="flex.layout.BasicLayout">
<Script>
<!--[CDATA[
import mx.controls.Alert;
import mx.utils.ObjectUtil;
private function btn_click(evt:MouseEvent):void {
var arr:Array = [];
arr.push(new FileFilter("Images", ".gif;*.jpeg;*.jpg;*.png"));
fileReference.browse(arr);
}
private function fileReference_select(evt:Event):void {
fileReference.load();
}
private function fileReference_complete(evt:Event):void {
img.source = fileReference.data;
Alert.show(ObjectUtil.toString(fileReference));
}
]]-->
</Script>
<Declarations>
<net:FileReference id="fileReference"
select="fileReference_select(event);"
complete="fileReference_complete(event);" />
</Declarations>
<mx:Panel id="panel"
layout="absolute"
horizontalCenter="0"
verticalCenter="0"
width="500"
height="300">
<mx:Image id="img"
verticalCenter="0"
horizontalCenter="0"
maxWidth="200"
maxHeight="200" />
<mx:ControlBar>
<mx:Button id="btn"
label="Browse and preview..."
click="btn_click(event);" />
<mx:Button label="Upload..."
enabled="false" />
</mx:ControlBar>
</mx:Panel>
</Application>


相关文档:

Flex:ArrayCollection转xml形式的实例

ArrayCollection转成xml类型示例
下面模拟一组数据exams,将其转化为xml形式.详细代码见下:
Xml代码
<?xml version="1.0" encoding="utf-8"?>  
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" fontSize="12"  creationComplet ......

SWF之间通信、Flex与SWF之间通信、C#与SWF之间通信


SWF之间通信、Flex与SWF之间通信、C#与SWF之间通信
一、SWF之间通信(各SWF文件均没有包含关系——非内部嵌入加载,均独立)
使用 LocalConnection 类可以创建一个 LocalConnection 对象,该对象可在一个 SWF 文件中或多个 SWF 文件间,调用另一个 LocalConnection 对象中的方法。 通过本地连接,可以在 SWF ......

flex as3开源组件


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/as3 ......

Flex组件(对话框)

java开发的总想尽快把flex和java结合起来,我也是,但这容易忽视一些基础的东西,刚把flex和java整合的第一步做完,忽然想在flex页面中弹出个对话框,不知道怎么写了,网上查了半天才出来.
原来这一句话就搞定了
Alert.show(content,title,flags,parent,closeHandle,iconClass,defaultButtonFlag);
以下是网上找到资料,供参考. ......

Flex 开发框架

更多 Flex 4 示例,请到 http://www.slsay.com
现有成熟常用的Flex框架:
 Cairngorm (Adobe Open Source) - MVC framework
 PureMVC (Open Source) - MVC framework
 Mate (Open Source) - tag-based, event-driven
 Swiz (Open Source) - Metadata-based Dependency Injection ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号