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

Flex通过HTTPService与servlet通信

flex代码:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/halo" minWidth="1024" minHeight="768">
<fx:Script>
<!--[CDATA[
import mx.controls.*;
import mx.rpc.events.ResultEvent;
import mx.rpc.http.mxml.HTTPService;

protected function button1_clickHandler(event:MouseEvent):void
{
var addNew:HTTPService = new HTTPService();
addNew.resultFormat = "text" ;
addNew.method = "POST";
addNew.url = "http://localhost:8084/Flex_web/flex";
addNew.addEventListener(ResultEvent.RESULT,result_Handler);

var param:Object = new Object();
param.user = user.text;
param.pwd = pwd.text;

addNew.send(param);
}

public function result_Handler(event:ResultEvent):void
{
var mes:String = event.message.body.toString();
Alert.show("成功!" + mes,"信息");
}
]]-->
</fx:Script>
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<s:Panel x="200" y="110" width="224" height="157" title="登录系统">
<s:Button x="24" y="92" label="登录" click="button1_clickHandler(event)" width="171" focusEnabled="true"/>
<s:TextInput x="67" y="10" id="user"/>
<s:TextInput x="67" y="49" id="pwd"/>
<s:Label x="20" y="15" text="用户名:"/>
<s:Label x="20" y="55" text="密码:"/>
</s:Panel>
</s:Application>
servlet代码:
package advang;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class flexServlet extends HttpServlet {

protected void processRequest(HttpServletRequest request, Htt


相关文档:

flex特效

这里面有许多特效很酷,希望对大家有帮助。 1.旋转 效果:http://www.alex-uhlmann.de/flash/adobe/blog/distortionEffects/effectCube/ 代码:http://weblogs.macromedia.com/auhlmann/archives/DistortionEffects.zip
2.画布按钮 http://dougmccune.com/blog/2007/06/01/new-component-canvasbutton-added-to-flexlib/ ......

flex 嵌入简单的html

<mx:TextArea
width=
"200"
height=
"100"
>
<mx:htmlText>
This is an example of setting a <B>
TextArea</B>
control's <I>
htmlText<I>
property.
</mx:htmlText>
</mx:TextArea>
支持的样式标记
< ......

关于flex 的几种绑定

第一种,使用{}绑定
<mx:TextInput
id=
"input"
/>
<mx:Label
text=
"{input.text}"
/>
第二种,<mx:Binding> 绑定
<mx:Application
xmlns:mx=
"http://www.adobe.com/2006/mxml"
layout=
"vertical"
>
<mx:TextInput
i ......

关于java+flex项目欢迎页的问题

开发了个flex和java的测试项目,因为flex文件比较多,所以创建flex时候,
在WebRoot下建立了文件夹bin,用来存储html和swf文件
想在浏览器输入http://localhost:8080/project直接可以访问文件夹下的html
第一,在WebRoot下建立index.jsp
<%@ page language="java" import="java.util.*" pageEncoding="GBK"%>
&l ......

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