Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/371.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 用C语言将在线flash客户端加载到windows窗体中#_Javascript_C#_Flash - Fatal编程技术网

Javascript 用C语言将在线flash客户端加载到windows窗体中#

Javascript 用C语言将在线flash客户端加载到windows窗体中#,javascript,c#,flash,Javascript,C#,Flash,我正在尝试使用C#和COM shockwave flash对象将flash游戏的游戏客户端加载到windows窗体中。我设法让客户机加载到表单中,但似乎客户机设置不正确,尽管我试图尽可能地模拟提供给客户机的变量 例如,flash客户端通过以下方式加载到网站上: swfobject.embedSWF("flash/qplay.swf", "qplay", "760px", "592px", "11.0.0",false, {qplaycookie:"cookiehashgoeshere", gam

我正在尝试使用C#和COM shockwave flash对象将flash游戏的游戏客户端加载到windows窗体中。我设法让客户机加载到表单中,但似乎客户机设置不正确,尽管我试图尽可能地模拟提供给客户机的变量

例如,flash客户端通过以下方式加载到网站上:

swfobject.embedSWF("flash/qplay.swf", "qplay", "760px", "592px", "11.0.0",false, {qplaycookie:"cookiehashgoeshere", gamefile:"qplay_era_20140214.png"}, {allowFullScreen:"true", allowFullScreenInteractive:"true", wmode:"direct", seamlesstabbing:"false", scale:"noscale",salign:"tl"},false);
我试图通过使用以下参数在C#中加载flash对象来反映这一点:

        flashClient.EmbedMovie = true;
        flashClient.SetVariable("qplaycookie", "cookiehashgoeshere");
        flashClient.SetVariable("gamefile", "qplay_era_20140214.png");
        flashClient.SeamlessTabbing = false;
        flashClient.SAlign = "t1";
        flashClient.AllowFullScreen = "true";
        flashClient.AllowFullScreenInteractive = "true";
        flashClient.WMode = "direct";
        flashClient.LoadMovie(0, "http://era.graalonline.com/flash/qplay.swf");
        flashClient.Play();
毫无效果。电影加载到表单flash对象中,但在第一个加载屏幕上保持休眠状态,就好像它没有被赋予上述变量或以某种方式初始化一样。我仔细研究了客户机所在网站(era.graalonline.com)上的javascript库,没有发现任何似乎与客户机进行交互的内容,以向客户机提供任何超出embedSWF调用中引用的信息

我还尝试更改gamefile变量,使其具有指向游戏客户端所在网站的正确URI路径,但没有成功


我不知所措。我做错了什么?

原来正确的答案是使用FlashVars行并远程加载游戏文件路径。很简单的错误

flashClient.FlashVars = "cookiehashgoeshere&gamefile=http://era.graalonline.com/qplay_era_20140214.png";
希望这对其他涉猎类似事物的人有用