[問題] BCB以TShockwaveFlash與swf傳值的問題
遇到的問題: (題意請描述清楚)
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
01/03 02:52, 1F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章