[問題] BCB以TShockwaveFlash與swf傳值的問題

看板C_and_CPP (C/C++)作者 (Esvent)時間15年前 (2010/11/29 16:46), 編輯推噓0(001)
留言1則, 1人參與, 最新討論串1/1
遇到的問題: (題意請描述清楚) TShockwaveFlash無法將便數值傳給swf 希望得到的正確結果: 希望傳的過去 程式跑出來的錯誤結果: 無錯誤,只是值沒有傳進去 開發平台: (例: VC++ or gcc/g++ or Dev-C++, Windows or Linux) BCB 2007 有問題的code: (請善用置底文標色功能) BCB的部份 void __fastcall TchatClient::ShockwaveFlash1FSCommand(TObject *ASender, const WideString command, const WideString args) { if(this->IdCmdTCPClient1->Connected()) { this->testMemo->Lines->Add(command); }else { this->IdCmdTCPClient1->Host=command; this->IdCmdTCPClient1->Connect(); AnsiString as=this->IdCmdTCPClient1->IOHandler->ReadLn(); this->testMemo->Lines->Add(as); this->ShockwaveFlash1->FlashVars = "test="+as; this->ShockwaveFlash1->SetVariable("test", as); } } Flash的部份 var host:String="127.0.0.1"; var test:String="123"; fscommand(host); fscommand(test); 補充說明: 還有試過在變數前加上_root、直接把參數的WideString command丟回去給test Google到的方法都試過了,還是不成功...囧 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 114.45.105.224 ※ 編輯: Esvent 來自: 114.45.105.224 (11/29 19:14)

01/03 02:52, , 1F
隔了一個月終於找到答案...原來是AS3不支援 改成AS2即可
01/03 02:52, 1F
文章代碼(AID): #1CysXYb4 (C_and_CPP)
文章代碼(AID): #1CysXYb4 (C_and_CPP)