惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

S
Secure Thoughts
Security Latest
Security Latest
Simon Willison's Weblog
Simon Willison's Weblog
O
OpenAI News
GbyAI
GbyAI
L
LINUX DO - 最新话题
A
Arctic Wolf
T
Tor Project blog
G
GRAHAM CLULEY
I
InfoQ
博客园_首页
IT之家
IT之家
The Register - Security
The Register - Security
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
The GitHub Blog
The GitHub Blog
Blog — PlanetScale
Blog — PlanetScale
N
Netflix TechBlog - Medium
K
Kaspersky official blog
博客园 - 三生石上(FineUI控件)
S
SegmentFault 最新的问题
U
Unit 42
PCI Perspectives
PCI Perspectives
量子位
P
Palo Alto Networks Blog
S
Securelist
T
Troy Hunt's Blog
博客园 - 【当耐特】
Recorded Future
Recorded Future
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
Engineering at Meta
Engineering at Meta
T
The Blog of Author Tim Ferriss
博客园 - 聂微东
罗磊的独立博客
N
News and Events Feed by Topic
人人都是产品经理
人人都是产品经理
B
Blog RSS Feed
NISL@THU
NISL@THU
C
Cisco Blogs
T
Threatpost
有赞技术团队
有赞技术团队
Forbes - Security
Forbes - Security
Hugging Face - Blog
Hugging Face - Blog
Last Week in AI
Last Week in AI
T
The Exploit Database - CXSecurity.com
Cloudbric
Cloudbric
Cyberwarzone
Cyberwarzone
Google DeepMind News
Google DeepMind News
C
Cyber Attacks, Cyber Crime and Cyber Security

博客园 - trace

flash8与javascript集成 ASP.NET 2.0母版页(MasterPage) “核弹”击中晚期直肠癌 驳图王:轻轻一招,获取上万IP SEO技巧一 很实用的缓动函数 [原创]flash动态改变注册点解决方案 flash+webservice 乱码问题解决一例(原创) 为flash构建asp.net Webservice flash 与 webservice 通信的两种方式 Flash 与 Web Service 技术的完美结 Flash 与 Web Service 技术的完美结合 Flash常用代码的介绍 flash to js flash 与 后台语言通讯 flash与js通讯(2) flash to js 使用工具包 用Javascript实现鼠标拖拽网页表单 (二) 用Javascript实现鼠标拖拽网页表单(一)
FLASH与WebService
trace · 2007-08-16 · via 博客园 - trace

我简单的说一下在FLASH RIA开发中FLASH结合WebService的用法。
WebService对于一种远程服务,可是说任何一个FLASH RIA开发人员都要掌握的。
FLASH部分:
在场景上建立一个输入框实例名为shuru(传入参数用) 建立一个按钮实例名为bt ,AS部分:

import mx.services.*;//引入命名空间
function getWeather(len:Number) {
 //构建WebService类,传入服务的自述地址
 var weatherservice:WebService =
 new WebService("http://localhost:1784/webfuwu/Service.asmx?WSDL");
 //接收服务的返回结果
 ResultObj = weatherservice.HelloWorld(len);
 //判断返回结果并执行操作,onResult监测返回成功事件
 ResultObj.onResult = function(result:Object) {
  //返回的是一个数组(由web服务返回类型决定)
  for (i=0; i<result.length; i++) {
   trace(result[i]);
  }
 };
}
bt.onRelease = function() {
 //传入数组长度
 getWeather(shuru.text);
};

.net部分:

using System;
using System.Web;
using System.Web.Services;
using System.Web.Services.Protocols;

[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class Service : System.Web.Services.WebService
{
    public Service () {

//如果使用设计的组件,请取消注释以下行 
        //InitializeComponent(); 
    }

[WebMethod]
    public string[] HelloWorld(int le)
    {
        string[] array1 = new string[le];
        for (int i = 0; i < array1.Length; i++)
        {
            array1[i] = i + "a";
        }
            return array1;
    }
    
}

很简单的一个实例,如果想了解这方面的看看吧,原理确实很简单