本页面由 Flash 保存计划 从 Internet Archive 存档还原 · 快照 2011-03-09 · 原址 http://space.flash8.net/bbs/thread-212237-1-1.html ← Flash 保存计划
返回列表 回复 发帖

关于FLASH REMOTING的问题

请问一下。我把FLASH REMOTING。NET的例子重新发布一下就出现这个问题。
请高手帮我解决一下。谢谢
**錯誤** 場景=Scene 1、圖層=::Actions、影格=1:行 15: 在開啟包含檔案 NetServices.as 時發生錯誤:找不到檔案。
#include "NetServices.as"
**錯誤** 場景=Scene 1、圖層=::Actions、影格=1:行 20: 在開啟包含檔案 NetDebug.as 時發生錯誤:找不到檔案。
#include "NetDebug.as"
我传上来给你
[upload=as]viewFile.asp?ID=182505[/upload]

2004-12/20041262238990.as (11.54 KB)

晕 BUG
既然传不了
我贴在这里吧
/**
* Copyright ?2002 Macromedia, Inc. All rights reserved.
*
* NetServices.as
* Moving or modifying this file may affect the applications installed on this server.
*/
trace("***** running NetServices");
//!!@ was include
load("RecordSet.as");
// -----------------------------------------------------------------
// NetServiceProxyResponder
// This is the automatically-generated responder object that is used
// when a service is called and no responder object was given.
// -----------------------------------------------------------------
_global.NetServiceProxyResponder = function(service, methodName)
{
//trace("NetServiceProxyResponder(" + service + "," + methodName + ")");
this.service = service;
this.methodName = methodName;
}
//!!@for tincan server
NetServiceProxyResponder = _global.NetServiceProxyResponder;
// This function gets called whenever an onResult is received from the server
// as a result of a call that is being handled by our responder object.
NetServiceProxyResponder.prototype.onResult = function(result)
{
//trace("NetServiceProxyResponder.onResult(" + result + ")");
var client = this.service.client;
// tell the result object what service it came from, if it wants to know.
// (this call usually has no effect, except for NetServiceProxy and RecordSet).
result._setParentService(this.service);
var func = this.methodName + "_Result";
if (typeof(client[func]) == "function")
{
// there is an "xxx_Result" method supplied - call it.
client[func](result);
}
else if (typeof(client.onResult) == "function")
{
// there is an "onResult" method supplied - call it.
client.onResult(result);
}
else
{
// nobody to call. Dump something to the output window.
NetServices.trace("NetServices", "info", 1, func + " was received from server: " + result);
}
}
// This function gets called whenever an onStatus is received from the server
// as a result of a call that is being handled by our responder object.
NetServiceProxyResponder.prototype.onStatus = function(result)
{
//trace("NetServiceProxyResponder.onStatus(" + objectToString(result) + ")");
var client = this.service.client;
var func = this.methodName + "_Status";
if (typeof(client[func]) == "function")
{
// there is an "xxx_Status" method supplied - call it.
client[func](result);
}
else if (typeof(client.onStatus) == "function")
{
// there is an "onStatus" method supplied - call it.
client.onStatus(result);
}
else if (typeof(_root.onStatus) == "function")
{
// there is an "onStatus" method at the root level - call it.
_root.onStatus(result);
}
else if (typeof(_global.System.onStatus) == "function")
{
// there is an "onStatus" method at the global level - call it.
_global.System.onStatus(result);
}
else
{
// nobody to call. Dump something to the output window.
NetServices.trace("NetServices", "info", 2, func + " was received from server: " + result.level + " " + result.description);
}
}

// -----------------------------------------------------------------
// NetServiceProxy
// -----------------------------------------------------------------
//!!@ used to be _global.NetServiceproxy = function
function NetServiceProxy(nc, serviceName, client)
{
if (nc != null)
{
// the constructor was called from ActionScript code
this.nc = nc;
this.serviceName = serviceName;
this.client = client;
}
// else - parameter is null, this probably means that
// this object has just been received as a typed object in an AMF message.
// just leave the data alone. construction of this object
// will be completed when _setParentService is called.
}
//!!@ to remain compatible wit the old netservices (on the client)
_global.NetServiceProxy = NetServiceProxy;
// Ensure that NetServiceProxy objects received via AMF messages get
// correctly deserialized into actionscript objects.
Object.registerClass("NetServiceProxy", NetServiceProxy);
NetServiceProxy.prototype._setParentService = function(service)
{
this.nc = service.nc;
this.client = service.client;
}
// This function gets called whenever somebody does "myService.methodName(parameters...)".
// We construct and return the function "f", which knows how to call the correct server method.
NetServiceProxy.prototype.__resolve = function(methodName)
{
//trace("NetServiceProxy.__resolve " + methodName);
var f = function()
{
// did the user give a default client when he created this NetServiceProxy?
if (this.client != null)
{
// Yes. Let’s create a responder object.
arguments.unshift(new NetServiceProxyResponder(this, methodName));
}
else
{
if (typeof(arguments[0].onResult) != "function")
{
NetServices.trace("NetServices", "warning", 3, "There is no defaultResponder, but no responder was given in call to " + methodName);
arguments.unshift(new NetServiceProxyResponder(this, methodName));
}
}
arguments.unshift(this.serviceName + "." + methodName);
return this.nc.call.apply(this.nc, arguments);
}
return f;
}
// -----------------------------------------------------------------
// NetConnection
// -----------------------------------------------------------------
// This function creates a service proxy object associated with this NetConnection.
NetConnection.prototype.getService = function(serviceName, client)
{
var result = new NetServiceProxy(this, serviceName, client);
//trace("NetConnection.getService " + result);
return result;
}
// This function sets the credentials into a standard header which gets sent to the server
// on all subsequent requests.
NetConnection.prototype.setCredentials = function(userid, password)
{
this.addHeader("Credentials", false, {userid: userid, password: password});
}
// This function gets called whenever a RequestPersistentHeader header is received from the server.
NetConnection.prototype.RequestPersistentHeader = function(info)
{
//trace("NetConnection_RequestPersistentHeader(" + objectToString(info) + ")");
this.addHeader(info.name, info.mustUnderstand, info.data);
}
// This function gets called whenever a RequestUrlRewrite header is received from the server.
NetConnection.prototype.RequestUrlRewrite = function(urlSuffix)
{
this.__urlSuffix = urlSuffix;

//trace("NetConnection_RequestUrlRewrite(" + objectToString(urlSuffix) + ")");
if (this.__originalUrl == null)
{
this.__originalUrl = this.uri;
}
var u = this.__originalUrl + urlSuffix;
//trace("NetConnection_RequestUrlRewrite(" + objectToString(urlSuffix) + "..." + u + ")");
this.connect(u);
}
// This function creates a new netconnection, which is just like the old connection,
// except it doesn’t have the headers.
NetConnection.prototype.clone = function()
{
var nc = new NetConnection();
nc.connect((this.__originalUrl == null) ? this.uri : this.__originalUrl);
if (this.__urlSuffix != null) nc.RequestUrlRewrite(this.__urlSuffix);
return nc;
}
// -----------------------------------------------------------------
// NetServices
// -----------------------------------------------------------------
if (_global.NetServices == null)
{
_global.NetServices = new Object();
//!!@for tincan server
NetServices = _global.NetServices;

// Grab a copy of the data which (probably) got passed into this .swf
// via the Object/Embed tag.
NetServices.gatewayUrl = gatewayUrl;
NetServices.urlSuffix = urlSuffix;
}
NetServices.setDefaultGatewayUrl = function(url)
{
//trace("NetServices.setDefaultGatewayUrl " + url);
NetServices.defaultGatewayUrl = url;
}
NetServices.setGatewayUrl = function(url)
{
//trace("NetServices.setGatewayUrl " + url);
NetServices.gatewayUrl = url;
}
// createGatewayConnection creates a NetConnection and connects it to the
// gateway. We choose an appropriate URL for the gateway.
NetServices.createGatewayConnection = function(url)
{
if (url == undefined)
{
// The gateway url wasn’t given, we must find it.
if (NetServices.isHttpUrl(_root._url))
{
// We’re running in a browser.
// Our first choice: the "gatewayURL" param that got passed to this .swf via the object/embed tag
// The developer could also set "gatewayUrl" *before* including NetServices.as.
url = NetServices.gatewayUrl;
if (url == undefined)
{
// our second choice: the default url that the developer said to use
url = NetServices.defaultGatewayUrl;

if (url != undefined)
{
// We must strip off the host+port that
// was supplied in the default url, since the only host+port that is allowed
// in a browser is the one that this .swf came from
if (NetServices.isHttpUrl(url))
{
var firstSlashPos = url.indexOf("/", 8);
if (firstSlashPos >= 0)
{
url = url.substring(firstSlashPos);
}
}

// The url exists, and doesn’t start with http://
// This means we should pre-pend the host+port of the URL of the current .swf.
var hostUrl = NetServices.getHostUrl();
if (hostUrl != null)
{
url = hostUrl + url;
}
}
}
}
else
{
// We’re running in authoring or the standalone player
url = NetServices.defaultGatewayUrl;
}
}

// See if we were able to find a gateway url to use
if (url == undefined)
{
// no url. no good.
NetServices.trace("NetServices", "warning", 4, "createGatewayConnection - gateway url is undefined");
return null;
}
// We found a gateway URL. Create the NetConnection object and connect to the URL.
var nc = new NetConnection();
nc.connect(url);
// Set up the session id if there was a object/embed tag param.
if (NetServices.urlSuffix != null)
{
this.RequestUrlRewrite(NetServices.urlSuffix);
}
//trace("NetServices.createGatewayConnection " + nc);
return nc;
}
// getHostUrl returns the hostname (and port) of the URL that contains the current .swf file.
// there is no trailing "/". returns null if the url is not http://something.
// example: if the swf url is http://my.foo.com:1234/some/thing/my.swf, this
// function will return "http://my.foo.com:1234".
NetServices.getHostUrl = function ()
{
if (!NetServices.isHttpUrl(_root._url))
{
// this url doesn’t start with "http://", I don’t know what to do with it.
return null;
}
var firstSlashPos = _root._url.indexOf("/", 8);
if (firstSlashPos < 0)
{
// hmmm...
return null;
}
return _root._url.substring(0, firstSlashPos);
}
NetServices.isHttpUrl = function (url)
{
// return url.startsWith("http://") || url.startsWith("https://");
return ((url.indexOf("http://") == 0) || (url.indexOf("https://") == 0));
}
// a function for debugging
/*
NetServices.objectToString = function(object)
{
var result = object.toString();
opener = "={";
closer = "";
for (var memberName in object)
{
var member = object[memberName];
if (typeof(member) != "function")
{
result += opener + memberName + ":" + NetServices.objectToString(member);
opener = ", ";
closer = "}";
}
}
return result + closer;
}
*/
// a function for reporting errors
NetServices.trace = function(who, severity, number, message)
{
var fullMessage = who + " " + severity + " " + number + ": " + message;
trace(fullMessage);
NetDebug.traceNetServices(who, severity, number, message);
}
// a function for telling the version number of NetServices and RecordSet
NetServices.getVersion = function()
{
return 1; // this value is also in the RecordSet constructor.
}
// -----------------------------------------------------------------

Flash Remoting虚拟主机

Flash Remoting虚拟主机(ActionScript API,RIA,Flash Remoting gateway,Action Message Format(AMF),Tomcat Java Eclipse JDK Jrun4 J2ee),支持Flex以及AIR技术,支持Ajax组件。支持SQL数据库,支持mxml,多媒体播放。
http://www.deidc.com/Services/Hosting/Flash_Remoting.asp

团队:关系过密影响战斗力

团队:关系过密影响战斗力  

美国《纽约时报》2005年3月7日刊登了一篇有关团队内部成员之间的关系对团队工作效率影响的文章。该文以美国著名的扬基棒球队作为优秀团队的范例,研究后认为,团队成员过于亲密不一定能提高团队绩效,而适度松散的人际关系更利于提高团队战斗力。

  松散的团队比紧密的团队更有弹性
  一般而言,运动队的更衣室最能反映队伍中的一些秘密。队员对存衣柜的选择与使用可以从某种程度上体现该队的组织关系。因此,有研究者详细观察了扬基队更衣室的使用情况。结果发现,该队的明星队员基本上散落于各个角落,穿插在一般队员之中。然而就是这样一支相对松散、各自为政的球队,在美国职业棒球联赛的历史上曾经创造了一个赛季胜114场的纪录。究竟是什么因素使该队有如此上佳的表现呢?
  研究压力之下团队效能的社会科学家发现,相对分散的团队比紧密团结的团队更加有弹性,更能经受得住压力的考验。来自军队、企业以及航天等领域的研究结果也证实,如果一个团队内有一些在紧要关头对集体坚信不移的个体,那么其他内部成员之间相对宽松的关系可能蕴藏着更大的战斗力。
  加州大学社会学教授加尔文·莫里奥博士的研究领域是竞争性的企业和高校中的群体行为。他发现,尽管相当多的心理学和社会学理论强调,沟通和紧密团结对组织战斗力提升有重大作用,但在许多情况下却恰恰相反。美国匹兹堡大学的心理学和管理学教授理查德·莫兰德博士认为,是胜利导致集体更加团结,而不是团结一定能够提升集体的战斗力。对于像棒球这样既要求个人发挥,又要求团队协作的工作,成员之间较为松散的关系更能有效对抗外界的压力,并产生大量的解决方案。
  关系松散有利于消除偏见
  研究也发现,成员之间松散的内部关系可能比紧密的关系更利于实现目标。关系较为松散的成员能在不破坏纪律和做好本职工作的同时,摒弃自己的
  偏见。而紧密团结的组织中,其主要成员的分歧会导致帮派的产生,各方不容易放弃自己的观点,导致矛盾的激化。
  心理学家也研究了顺利完成任务的特种部队和宇航员的团队特征。
  研究结果表明,这些人的共同特征表现为独立、不受约束、自信、能忍受不确定性以及容易与别人交往。美国国家空间生物医学研究所的首席顾问、加州大学人类学教授劳伦斯·帕林卡斯博士说:"他们表现得不太喜欢与人交往,社交需求相对贫乏,也不太需要别人支持。"
  组织团结过紧害处大
  如果组织团结过紧会怎么样呢?早在1895年,以研究大众心理特征著称的法国著名社会心理学家古斯塔夫·勒庞就出版了他的传世之作《乌合之众---大众心理的研究》。他认为现代生活逐渐以群体的聚合为特征,个人融入集体后个性便容易湮灭,群体的思想将占据统治地位。勒庞认为,心理群体是一个由异质成分组成的暂时现象,人们在一起时所产生的想法,与单个人的想法大不相同。而尤为可怕的是群体的行为一旦出现偏差,就可能表现为无异议、情绪化和低智商。在勒庞之后,弗洛伊德等心理学家继续对群体心理做了大量的研究。
  虽然时光已经过去100多年,但我们发现,勒庞等人的理论有着惊人的预见性。具有较强凝聚力的团队在做出某种决定的时候,总是深为"集体思想"所累。根据社会心理学家的理论,集体思想是"具有凝聚力的集体中成员的一种思考模式,有某种共识存在于该集体中,并处于强大的支配地位,以至于往往忽视了对其他各种行动方案的客观评价"。这样的团队经常觉得自身无懈可击。面对这样的从众压力,团队成员不容易坚持自己的观点。
  这就为团队的行事效果带来了巨大的风险,使团队变得冲动、易变、急躁、易受暗示,从而使集体行为缺乏理性的约束,趋于偏执、专横、保守。
  当然较弱的团队凝聚力更不利于团队战斗力的提升。最有战斗力的团队是团结程度适当的团队,这种凝聚力并不压抑团队成员的创意和思考。上下级之间、同级之间沟通渠道通畅,制定出的决策民主而科学,那么就会产生很好的执行力、战斗力。 (转载)

推荐栏目:
市场营销学  市场营销论文 市场营销案例  市场营销策略  市场营销策划

张金洋打造专业营销团队

电炉:http://www.grand-yield.com

提示: 作者被禁止或删除 内容自动屏蔽
我也有过类似问题。
返回列表