- 浏览: 44944 次
- 性别:
- 来自: 深圳
最新评论
即时搜索效果察看
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
发表评论
-
Flv网络播放器制作全攻略
2010-04-10 10:02 587***************************** ... -
flash中NetConnection与NetStream知识整理
2010-04-10 10:02 647NetConnection只有一个connect方法,NetS ... -
flv制作工具大全
2010-04-10 10:02 824Collected links to Flash Vid ... -
FLV播放器汇总
2010-04-10 10:01 595http://www.dengjie.com/weblog/c ... -
《AS 3 Cookbook 中文版》 第二章. 自定义类 2.0. 简介
2010-04-09 12:59 579ActionScript 3.0 最本质的 ... -
《AS 3 Cookbook 中文版》 第二章. 自定义类 2.0. 简介
2010-04-09 12:59 492ActionScript 3.0 最本质的 ... -
《AS 3 Cookbook 中文版》 第三章. 运行时环境 3.0. 简介
2010-04-09 12:59 755[1b] 3.0. 简介 [/1b]Flash ... -
《AS 3 Cookbook 中文版》 第三章. 运行时环境 3.0. 简介
2010-04-09 12:59 694[1b] 3.0. 简介 [/1b]Flash ... -
Flex2/AS3在Linux下的开发环境
2010-04-09 12:58 643这次修正了万恶的“Incorrect flash playe ... -
【as3】ActionScript 3.0体验试教学视频教程
2010-04-09 10:05 571很不错的视频教程 原文地址: http://blog.sina ... -
as3 使用sound类(翻译)-暂停和继续播放声音
2010-04-09 10:05 617[1b]问题十[/1b] 如何暂停声音,如何从暂停的地 ... -
AS3制作MP3波形图
2010-04-09 10:05 677示地址: http://www.taoshaw.com/tao ... -
AS3制作MP3波形图
2010-04-09 10:05 865示地址: http://www.taoshaw.com/tao ... -
as3打造一个非常酷的莲花曲线效果
2010-04-09 10:05 644详细代码: var radius:int=100; va ... -
跑动的小火柴人(flash动画)
2010-04-08 10:23 570本教程描绘的是完全用ActionScript做的一个火柴棍小人 ... -
旋转的flash花朵
2010-04-08 10:23 617先看下最终效果: 本课中的内容涉及:函数定义, for... ... -
旋转的flash花朵
2010-04-08 10:23 644先看下最终效果: 本课中的内容涉及:函数定义, for... ... -
逐帧flash动画制作:花儿吃蝴蝶
2010-04-08 10:23 864先看看效果: 分析: ... -
逐帧flash动画制作:花儿吃蝴蝶
2010-04-08 10:22 841先看看效果: 分析: ... -
鸽子动态画法
2010-04-08 08:35 873禽类的画法:鸽子动态。来一起分析下鸽子的运动方式。[1b](未 ...
相关推荐
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