易截截图软件、单文件、免安装、纯绿色、仅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 百叶窗效果

Blinds.as
package effects
{

import effects.effectClasses.BlindsInstance;

import mx.controls.scrollClasses.ScrollBarDirection;
import mx.effects.IEffectInstance;
import mx.effects.TweenEffect;

public class Blinds extends TweenEffect
{

......

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


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

flex 制作的简单计算器

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

Flex 本地安全策略问题

今天在做项目的时候遇到了一个问题,访问xml文件就是成功不了。看了看以前写过的代码都可以,而这个项目中为什么就不行了呢?仔细查看了目录,是百思不得其解啊。
错误信息:*** Security Sandbox Violation ***
Connection to file:///C|/loading.swf halted - not permitted from xxxx/data.xml。这个xml是在工程里面sr ......

利用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 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号