看板 Flash 關於我們 聯絡資訊
小弟新手,想請問強者一個簡單的問題。 用相同的as3、jsp程式碼,可以用在flash cs3發布的.exe檔,但是卻不能用在cs5發布 的.exe檔。 我要輸入帳號密碼,然後比對資料庫的資料是否相同,可是好像jsp都收不到值 到底是出了甚麼問題? stop(); import flash.net.URLLoader; import flash.net.URLRequest; import flash.net.URLLoaderDataFormat; import flash.net.URLVariables; import flash.events.Event; import flash.events.HTTPStatusEvent; import flash.events.IOErrorEvent; import flash.events.ProgressEvent; import flash.events.SecurityErrorEvent; go_btn.addEventListener(MouseEvent.MOUSE_DOWN,goin); function goin(event:MouseEvent) { var myRequest:URLRequest = new URLRequest("http://localhost:8080/login.jsp"); var myLoader:URLLoader = new URLLoader(); var myVariables:URLVariables = new URLVariables(); myLoader.addEventListener(Event.COMPLETE, loadSuccessful); myLoader.addEventListener(IOErrorEvent.IO_ERROR, loadError); myVariables.var3 = id_txt.text; myVariables.var4 = psw_txt.text; myRequest.method = URLRequestMethod.POST; myRequest.data = myVariables; myLoader.dataFormat = URLLoaderDataFormat.VARIABLES; myLoader.load(myRequest); function loadError(evt:IOErrorEvent):void { trace("傳送失敗"); } function loadSuccessful(evt:Event):void { if(myLoader.data.a==1) { gotoAndStop("2"); } else gotoAndStop("3"); } } -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.58.187.192