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

推荐订阅源

Google DeepMind News
Google DeepMind News
C
Cybersecurity and Infrastructure Security Agency CISA
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
T
Tailwind CSS Blog
G
GRAHAM CLULEY
博客园 - 叶小钗
T
Threatpost
小众软件
小众软件
The Hacker News
The Hacker News
博客园 - 聂微东
博客园 - 三生石上(FineUI控件)
P
Privacy & Cybersecurity Law Blog
AWS News Blog
AWS News Blog
P
Proofpoint News Feed
Jina AI
Jina AI
S
Schneier on Security
N
News | PayPal Newsroom
Help Net Security
Help Net Security
A
Arctic Wolf
T
The Blog of Author Tim Ferriss
大猫的无限游戏
大猫的无限游戏
T
Troy Hunt's Blog
美团技术团队
L
Lohrmann on Cybersecurity
The Last Watchdog
The Last Watchdog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
P
Privacy International News Feed
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cisco Blogs
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Hugging Face - Blog
Hugging Face - Blog
B
Blog RSS Feed
The Register - Security
The Register - Security
博客园 - Franky
Stack Overflow Blog
Stack Overflow Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
S
SegmentFault 最新的问题
腾讯CDC
云风的 BLOG
云风的 BLOG
Simon Willison's Weblog
Simon Willison's Weblog
Google DeepMind News
Google DeepMind News
AI
AI
GbyAI
GbyAI
Attack and Defense Labs
Attack and Defense Labs
Cloudbric
Cloudbric
I
Intezer
The GitHub Blog
The GitHub Blog
V2EX - 技术
V2EX - 技术
Scott Helme
Scott Helme
J
Java Code Geeks

博客园 - 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;
    }
    
}

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