Re: [問題] Flash接收PHP傳送的變數
※ 引述《hic (~終日昏昏睡夢間~)》之銘言:
: 爬文看到這篇文章
: 但實際測試檔案好像還是無法在flash抓到php要傳的值
: 能否請懂得flash與php傳值的板友
: 幫我看一下是哪個地方寫錯了呢?
: 謝謝
: 以下附上連結及程式碼(大部分是複製zswolf/MrMarcus兩位大大的文章內容)
: (以flash 8製作)
: http://tfgcamille.myweb.hinet.net/temp/test.rar
: [php內容]
: <?
: $a="Hic";
: $returnToFlash = "reply_txt=".$a;
: echo mb_convert_encoding($returnToFlash, "UTF-8", "BIG5");
: ?>
: [flash AS內容]
: var myEntries = new LoadVars();
: myEntries.load("http://localhost/test.php?=");
: myEntries.onData = function(success) {
^^^^^^
改成 onLoad
: if (success) {
: trace(this.reply_txt);
: //有放一個變數名為 reply_txt 的動態文字區塊
: for(i in this) trace(i + '=' + this[i]);
: } else {
: reply_txt.text = "not yet";
: }
: };
: [輸出結果]
: undefined
: onData=[type Function]
: ※ 引述《MrMarcus (請勿忘記密碼)》之銘言:
: : [del]
: : 上面這行改成 trace(this.reply_txt); 才對。
: : 可以在這裡加上下面這行檢視接收到的資料:
: : for(i in this) trace(i + '=' + this[i]);
: : [del]
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 122.116.64.235
推
03/15 01:34, , 1F
03/15 01:34, 1F
討論串 (同標題文章)
本文引述了以下文章的的內容:
完整討論串 (本文為第 4 之 4 篇):
Flash 近期熱門文章
PTT數位生活區 即時熱門文章