本篇文章將介紹flash Remoting 開發的必備的運行環境和相關{
function onclick()
{
tagshow(event)
}
}">配置過程:
一。開發必備環境。
1. flex 3,請從Adobe官方網站下載或其它地方找D版(目前為止D版還沒有出)。
2. Visual Studio 2005,.net 2.o。
3. fluorinefx(flash(flex) Remoting 與 伺服器程式資料互動的.net伺服器端運行環境),:http://www.fluorinefx.com/download/fluorinefx/1.0.0.5/fluorinefx.exe 。
二。相關配置過程。
1.{
function onclick()
{
tagshow(event)
}
}">安裝fluorinefx,安裝時請退出Visual Studio先。
2.安裝fluorinefx後,開啟Visual Studio2005,檔案-->建立-->項目-->其它項目類型-->Visual Studio解決方案-->空白解決方案。
3.然後在方案總管右鍵,添加-->添加新網站-->fluorinefx ASP.NET Web Site,設定網站名稱和路徑,Ok,.net伺服器端配置完成(如)。{
function onmouseover()
{
showMenu(this.id, 0, 1)
}
}">
4.開啟Flex 3,File-->New-->Flex Project,在Project Name(工程名稱)中輸入RemotingDemo,Project location(工程路徑)選擇工程徑,Application type(應用程式類型)此處選擇Web application(run in Flash Player),Server technology的Application Server Type選擇CodeFusion之CodeFusion Flash Remoting,然後Next(如)。
{
function onmouseover()
{
showMenu(this.id, 0, 1)
}
}">{
function onclick()
{
zoom(this);
}
}" src="http://s4.sinaimg.cn/middle/6f06b543ha43b85ba1843&690" alt="" width="690" height="507">
{
function onmouseover()
{
showMenu(this.id, 0, 1)
}
}">
frn_3.gif(17.41 K)2008-12-23 12:36:55
OK,flex 3 + .net開發flash Remoting的配置就完成了,其中要注意的地方在上面的文字中以紅色標記,接下來就要編程了。
frn_2.gif(15.86 K)2008-12-23 12:36:55
5.Server location之CodeFusion server installation type請根據伺服器類型選擇,如果伺服器是CodeFusion請選擇Standalone,如果是.net或Java請選擇Deployed J2EE Server,這個地方本人在建項目時遇到麻煩,因為看到J2EE Server這個字眼,以為專為Java設定的,故選擇了Standalone,豈知Validate Configuration始終沒有成功,提示為“Invalid root. The WEB-INF/flex folder must contain either flex-config.xml or services-config.xml.”。baidu了一下,才明白Standalone是CodeFusion伺服器類型的,所以馬上選擇Deployed J2EE Server,然後設定Web root(網站根目錄)為第3步建立的fluorinefx ASP.NET Web Site的網站根目錄,Root Url(網站根目錄URL)為運行剛剛建立的fluorinefx ASP.NET Web Site的Url,Context root這個沒弄白什麼意思,上網也沒有找到相關資料,不過後來{
function onclick()
{
tagshow(event)
}
}">調試Flex項目時出錯,trace異常資訊才發現,如果未設定Context root,那訪問伺服器的網址就不對(少於WebFR),對照了一下,如果Web root為http://localhost:15799/WebFR/,那Context root應該設定為WebFR。Output folder會自動填寫(根據以上的配置),點擊“Finish”完成(如)。