flex .net交互
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" >
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
private function onSuccess(evt:ResultEvent):void
{
Alert.show(evt.result.toString());
}
]]>
</mx:Script>
<mx:WebService id="dataService" wsdl="http://localhost:4702/flex/WebService.asmx?wsdl" useProxy="false">
<mx:operation name="HelloWorld" result="onSuccess(event)" />
</mx:WebService>
<mx:Button x="73" y="48" label="Button" click="dataService.HelloWorld.send()"/>
</mx:Application>
====================FLEX==========
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
'若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消对下行的注释。
<System.Web.Script.Services.ScriptService()> _
<WebService(Namespace:="http://tempuri.org/")> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Public Class WebService
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function HelloWorld() As String
Return "Hello World"
End Function
End Class
===================.NET============
相关文档:
var formatter:DateFormatter = new DateFormatter();
formatter.formatString = "YYYY-MM-DD JJ:NN:SS";
Alert.show(formatter.format(new Date())); ......
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Style>
ScrollBar
{
/*划动块图片皮肤*/
thumbDownSkin: Embed(source="scrollBar/thumb. ......
Flex vs Flash
Flex是一个针对企业级富互联网应用的表示层解决方案;
Flex是 RIA(rich internet applications,即富客户端)的一种技术实现
Flex是一种应用程序框架;
Flex序列产品包括编译工具和IDE,通过编写MXML(一种类XML标记语言)和ActionScript(AS,Flex的脚本语言,从Flash移植过来)代码,用编译器来生成SWF文 ......
分页组件:Page.mxml:
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml" width="400" height="300" >
<mx:Script>
<![CDATA[
&nbs ......