flex webserver .net
<?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/mx" minWidth="955" minHeight="600">
<fx:Script>
<!--[CDATA[
import mx.rpc.events.ResultEvent;
/* import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
internal function onRequest():void
{
websevercalc.Calu.send();
}
internal function onSuccess(evt:ResultEvent):void
{
this.result.text =evt.result.toString();
}
internal function onFualt(evt:FaultEvent):void
{
} */
private function fnText(event:ResultEvent):void
{
this.result.text = event.result.toString();
}
]]-->
</fx:Script>
<fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
<s:WebService id="websevercalc" wsdl="http://localhost:1524/WebService1.asmx?wsdl" useProxy="false" >
<s:operation name="Calu" result="fnText(event)" >
<s:request >
<r>
{this.txt.text}
</r>
</s:request>
</s:operation>
</s:WebService>
</fx:Declarations>
<s:Label x="287" y="111" id="result" />
<s:Button x="209" y="111" label="圆周长" click="websevercalc.Calu.send() "/>
<s:TextInput x="73" y="111" id="txt"/>
</s:Application>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Services;
namespace HzBsTest
{
/// <summary>
/// WebService1 的摘要说明
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System.ComponentModel.ToolboxItem(false)]
// 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消对下行的注释。
// [System.Web.Script.Services.ScriptService]
public class WebServ
相关文档:
其实这就是个数据显示的问题,经常我们的原始数据并不是最终显示给用户的,而是以另一种方式显示,比如性别假设在后台数据以boolean变量来保存,即true为男,false为女,那么界面就需要处理把true变成string的“男”。对于格式转换一般flex你们使用Formatter类,当然Formatter类是比较抽象的类,然后更具体的如Cu ......
Testing Flex applications with FlexMonkey 1.0
Without automation, testing the UI components of your Flex
application can be tedious and time consuming. Adobe includes an
automation framework in Flex to enable developers to create automated
tests that operate at the GUI level. FlexMonkey
1.0 i ......
因为无论是FLEX,还是Silverlight、AJAX,他们都无法直接操作数据库(据最新消息,微软有了Microsoft .NET RIA Services,它可以直接操作数据库,我期待着她能在VS2010中出现),通常用WEBSERVICE等中间人的方式来进行SOAP协议的的文本传输,效率很低(大家试一下就会知道简直无法忍受),FLEX为了加快传输速度,于是制定了 ......
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" layout="vertical" creationComplete="initApp()">
<mx:states>
<!--新建“index”State-->
<m ......
转自:http://blog.csdn.net/meteorlWJ/archive/2008/03/27/2223239.aspx
这一次的Flex 实践将要实现以下功能:
1、自定义一个简单的 Flex 组件
2、创建一个Index. mxml 来调用该组件
&n ......