- 浏览: 40432 次
- 性别:
- 来自: 上海
最新评论
即时搜索效果察看
Live Search 的程式分成两部份,它的组成大约是一点点 Javascript,加上适量的 CFML,以及很多的 ActionScript...。在程式码之前有一段小小的 DHTML,用来显示叫出 pop-up window 的 link,如下:
NewPopUpWindowAtCenter = function(aa,bb,ww,hh){
var tmp_top = ( window.screen.height - hh ) / 2;
tmp_top = tmp_top * 2 / 3;
var tmp_left = ( window.screen.width - ww ) / 2;
window.open(aa,bb,’height=’+hh+’,left=’+tmp_left+’,location=no,menubar=no,resizable=no,scrollbars=no,status=no,toolbar=no,top=’+tmp_top+’,width=’+ww);
}
开启搜寻
第一部份 livesearch.cfm 是重头戏,即内含 Flash Remoting 功能的 Flash Form。其语法虽然源自 AS Fusion,但我已将不必要的部份尽量精简,以将流程单纯化,并减少一些程式码:
function formOnLoad(){
myForm_01.myGlobalObjects = {};
setUpRemoting();
setStyles();
}
function setUpRemoting(){
var myConnection:mx.remoting.Connection = mx.remoting.NetServices.createGatewayConnection("http://www.j2eemx.com/flashservices/gateway/");
var myService:mx.remoting.NetServiceProxy;
var myResponseHandler:Object = {};
var myDataGrid_01:mx.controls.DataGrid = myDataGrid_01;
myResponseHandler.onResult = function( results: Object ):Void {
mx.managers.CursorManager.removeBusyCursor();
myDataGrid_01.dataProvider = results;
myDataGrid_01.selectedIndex = undefined;
}
myResponseHandler.onStatus = function( stat: Object ):Void {
mx.managers.CursorManager.removeBusyCursor();
alert("Error: " + stat.description);
}
myForm_01.myGlobalObjects.myCFC = myConnection.getService("cfcs.livesearch", myResponseHandler);
}
function submitSearch(){
mx.managers.CursorManager.setBusyCursor();
var tmp = myKeyword_01.text;
myForm_01.myGlobalObjects.myCFC.search_title(tmp);
}
function goArticle(){
var myDataGrid_01:mx.controls.DataGrid = myDataGrid_01;
var tmp_url = myDataGrid_01.selectedItem.atc_uid;
tmp_url = "http://j2eemx.com/cfdp_cfms/article.cfm?atc=" + tmp_url;
tmp_url = tmp_url + "&mode=1";
getURL("javascript:;window.opener.location.href=’"+tmp_url+"’;window.close();");
}
function setStyles(){
_global.styles.ComboBox.setStyle("color", 0x00253D);
_global.styles.Label.setStyle("color", 0x222222);
_global.styles.CheckBox.setStyle("color", 0x00253D);
_global.styles.RadioButton.setStyle("color", 0x00253D);
_global.styles.Form.setStyle("color", 0x222222);
_global.styles.Form.setStyle("fontSize", 13);
_global.styles.Button.setStyle("color", 0x222222);
_global.styles.Button.setStyle("borderThickness", 1);
本文转自:http://www.5uflash.com/flashjiaocheng/Fmsjiaocheng/2318.html
发表评论
-
Remoting中接受query类型数据方法
2010-04-10 10:00 504var listInfo = new Array() fun ... -
Remoting中接受query类型数据方法
2010-04-10 10:00 497var listInfo = new Array() fun ... -
Flash remoting参数传递与调用补充
2010-04-10 10:00 551续flash remoting中参数传递与调用,补充其他数据类 ... -
Flash remoting参数传递与调用补充
2010-04-10 10:00 639续flash remoting中参数传递与调用,补充其他数据类 ... -
Flex2/AS3在Linux下的开发环境
2010-04-09 12:58 494这次修正了万恶的“Incorrect flash playe ... -
flash AS3的面向对象特点概述
2010-04-09 12:58 829本文是我(aw)在整理了相关文档和讨论之后,结合自己的亲自实 ... -
flash AS3的面向对象特点概述
2010-04-09 12:58 724本文是我(aw)在整理了相关文档和讨论之后,结合自己的亲自实 ... -
从AS1和AS2到AS3的观念转变
2010-04-09 12:57 643[1b]AS1/2-AS3观念的转变(Meet with n ... -
从AS1和AS2到AS3的观念转变
2010-04-09 12:57 546[1b]AS1/2-AS3观念的转变(Meet with n ... -
as3打造一个非常酷的莲花曲线效果
2010-04-09 10:04 693详细代码: var radius:int=100; va ... -
AS3.0 单一职责原则设计模式
2010-04-09 10:04 691呵呵,好久没写了。因为前段时间心情不是很好,并且各种事情比较多 ... -
AS3.0 单一职责原则设计模式
2010-04-09 10:04 675呵呵,好久没写了。因为前段时间心情不是很好,并且各种事情比较多 ... -
ActionScript 3 开发的需注意的方面
2010-04-09 10:03 544这些东东都不是很难,只是方法不常用或没注意到,以后还会陆续添加 ... -
ActionScript 3 开发的需注意的方面
2010-04-09 10:03 514这些东东都不是很难,只是方法不常用或没注意到,以后还会陆续添加 ... -
《银河动画》鼠绘教程 (1)
2010-04-08 10:22 665本教程是给对flash有基础了解的人看的(最起码你得知道fla ... -
《银河动画》鼠绘教程 (1)
2010-04-08 10:22 547本教程是给对flash有基础了解的人看的(最起码你得知道fla ... -
《银河动画》鼠绘教程 (2)
2010-04-08 10:21 532先画草图!! [url=http://space.flash8 ... -
《银河动画》鼠绘教程 (2)
2010-04-08 10:21 519先画草图!! [url=http://space.flash8 ... -
《银河动画》鼠绘教程 (3)
2010-04-08 10:21 563一般的简单动画都会吧?别告诉我你连物体移动都不会!! ... -
漫画绘制技法大放送(上)
2010-04-08 08:33 482网络收集整理(jundark) [1b]一、人体基本结构[/1 ...
相关推荐
Flash Remoting官方帮助手册
使用FluorineFx和Flash Remoting+net.pdf
flash remoting mx 用于flash数据库编程
使用.NET Remoting 创建五子棋对战游戏(上)
使用Remoting开发分布式应用使用Remoting开发分布式应用
使用.NET Remoting 建立分布式应用程序(二).
示例代码 使用Remoting实现聊天功能。
使用.NET Remoting从服务器主动发出事件通知客户端(远程广播) 经常看见有人问:使用.NET Remoting如何从服务器主动发出事件通知客户端?的确,初接触.NET Remoting的人多半会有这样的疑问,因为大部分的文章和...
使用.NET Remoting 建立分布式应用程序(三)
.NET Remoting 的入门课程,通过实例介绍Remoting技术,使广大.NET学习者对.NET Remoting有一个整体的感性认识。演示了如何快速的建立和配置分布式应用程序中服务端和客户端。
使用.NET Remoting 建立分布式应用程序(四)
前一段时间思考分布式系统的缓存设计时,考虑到使用多个Web应用程序(甚至包括Console,WinForm程序)一起共享数据的实现,就想到了使用Remoting的架构。Remoting服务器可以被所有类型的前端程序访问,所以能实现...
使用.NET Remoting 建立分布式应用程序(一) code
使用.NET Remoting 建立分布式应用程序(六):使用.NET Remoting 创建五子棋对战游戏(下) code
使用.NET Remoting 建立分布式应用程序(五):使用.NET Remoting 创建五子棋对战游戏(上) code
客户端使用udp查找服务端,通过remoting与服务端通信,服务端可对在线用户广播信息,客户端信息通过服务端转发,通过事件触发信息显示,客户端之间可私聊。客户端取消订阅为离线,发送信息自动上线。
微软任旻讲师的《使用.NET Remoting 建立分布式应用程序》课程,使用.NET Remoting 创建五子棋对战游戏源码。
资源名称:使用.NET Remoting 建立分布式应用程序视频教程资源目录:【】7a541feba03b93376377e76e561c5c75【】f037c18f05fb8b08213aaf289f7e594c【】使用.NETRemoting建立分布式应用程序(一)【】使用.NETRemoting...
学习 remoting 学习 remoting 学习 remoting 学习 remoting 学习 remoting 学习 remoting 学习 remoting 学习 remoting