我想知道每個人的經驗是什麼,爲什麼網絡請求可以在FlashCS5和瀏覽器本地工作,但是當我在線發佈它時失敗。 survivorId
是從字符串查詢中發送的。兩個測試都完成了調用網絡數據庫。MiniGame在FlashCS5中正常工作,但失敗Online
我已經試過如下:
文本字段輸出survivorId
如果正在正確地發送的參數變量看。
在發佈設置中設置「僅聯網」選項。
還有一種方法可以從瀏覽器輸出跟蹤動作以進行更深入的調試嗎?
*編輯:我已經在瀏覽器中本地重新創建了該錯誤。沒有跟蹤行動,我不知道我是否可以弄清楚。
* EDIT2:這個錯誤只出現了,因爲它從本地主機(道歉,這只是奇怪)
這裏是我的代碼,有「舞臺」則變爲「localSurvivor」(動畫片段),然後在側該localSurvivor影片剪輯的 「lPlayer」 類的addChild()來localSurvivor影片剪輯
Stage-> localSurivor-> lPlayer(survivorId);
在舞臺上是這樣的代碼:
//Set localP Id
var survId:Number = root.loaderInfo.parameters.sId;
//Object(root).informationTxt.text = survId;
//加載影片剪輯類_____________________________
//Load Local Survivor
var localP:MovieClip = new lPlayer(survId);
//Add to stage
Object(root).localPlayer.addChild(localP);
//------------------------------------------
然後lPlayer類中:
public function lPlayer(survId:Number) {
//First retrieve player information(Position, SWF File, MapId, etc, etc)
//Prepare data to request
netVariables.act = "fortDetails";
netVariables.survivorId = survivorId;
netRequest.method = URLRequestMethod.POST
netRequest.data = netVariables;
netLoader.dataFormat = URLLoaderDataFormat.VARIABLES;
//Attach Event Handler to proccess data
netLoader.addEventListener(Event.COMPLETE, proccessFirstRun);
}
private function proccessFirstRun(rawData:Event) {
var playerInfo = rawData.target.data
//Player Info Loaded, Load the player onto the board
this.x = playerInfo.setx;
this.y = playerInfo.sety;
//Activate remote Survivors with fortId
Object(root).remotes.changeLevel(playerInfo.fid);
Object(root).zombieContain.changeLevel(playerInfo.fid);
}
//Request Data
netLoader.load(netRequest);
不錯的鏈接!投了票。 – Unsigned 2011-04-01 02:42:04
感謝閃存程序工作更多的無限的方式,我可以想象,我相信你是正確的crossdomain限制下面的輸出顯示與此相關的東西。錯誤#2044:未處理的securityError :. text =錯誤#2048:安全沙箱違規:http://www.saladbowlers.com/fleshvirusv3/claimfort/claimfort.swf?sid=4無法從http://saladbowlers.com/fleshvirusv3/claimfort/lPlayer.php加載數據。 – Xenland 2011-04-01 03:38:33
修復了錯誤劑量顯示的crossdomain.xml策略,但是這是靜止顯示的最後一個:SecurityError:錯誤#2000:沒有活動的安全上下文。 – Xenland 2011-04-01 04:22:54