易截截图软件、单文件、免安装、纯绿色、仅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时序图示例

<?xml version="1.0" encoding="utf-8"?>
<!-- Simple example to demonstrate the DateTimeAxis class. -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>

import mx.collections.ArrayCollection;
......

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

Flex和AIR不适合你的5个理由(RIAMeeting译)


不知道大家看了是怎么想的,有些牵强附会,专牛角尖的感觉,不过先不管观点是否正确,多一份参考总归不会错吧。
作者认为,任何一个平台都不是完美的,自然Flex和AIR也是如此,有它们强势的地方,就必然有弱势的地方,当你选择了一个解决方案,也就必须了解并避开它们的缺陷。那么哪些地方是Flex和AIR的缺陷呢,来看看作 ......

利用VC2008的插件去开发Flex和Ruby

tofino  http://www.ensemble.com/products/tofino.html
Ensemble Tofino for Visual Studio is a plugin that enables .NET
developers to create Flex front ends for their applications in the same
IDE that they normally use. Instead of using a separate text or XML
editor and manually invoking the c ......

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号