单击C#windows窗体中的.swf按钮构成应用程序webbrowser

时间:2012-01-18 05:14:38

标签: c# flash webbrowser-control

我正在尝试点击我的C#windows forms webbrowser中的shockwave flash按钮。目前在我的Windows窗体应用程序中,我登录网站并进入按钮所在的网页。我想点击我的窗体表单按钮,然后单击闪烁按钮5次,点击之间暂停约15秒。截至目前,我什么也没有,但谷歌搜索和无处可去的时间很长。从我可以告诉和使用的内容来看,这些机制都包含在button_2.swf中,我试图在网站上调用javascripts,但没有任何反应。在swf中,你需要'rollOver'闪存按钮,然后'按'运行'gotoandplay(11)',并且在某些时候最后会运行一些xml代码。是的,html代码中没有flash脚本,但它无法正常工作,所以这是不可能的。该按钮的html代码如下:

<div id='button'>
    <script type="text/javascript">
        function disableButton() {
            btn = document.getElementById('luckybutton');
            btn.style.display = 'none';
            btn_clicked = document.getElementById('luckybutton_clicked');
            btn.style.display = 'block';
        }
    </script>
    <div id='luckybutton' style="z-index:1">
        <script language="javascript">
            AC_FL_RunContent('codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0','width', '373','height', '373','src', '/images/buttons/','quality', 'high','pluginspage', 'http://www.macromedia.com/go/getflashplayer','align', 'middle','play', 'false','loop','true','scale','showall','wmode','transparent','devicefont','false','id', '','bgcolor', '#ddeef6','name', '','menu', 'true','allowFullScreen', 'false','allowScriptAccess','sameDomain','movie', '/images/buttons/button_2','salign', ''); //end AC code
        </script>
        <noscript>
            <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="373" height="373" id="" align="middle" style="z-index:1">
                <param name="allowScriptAccess" value="sameDomain" />
                <param name="allowFullScreen" value="false" />
                <param name="movie" value="/images/buttons/button_2.swf" />
                <param name="quality" value="high" /><param name="bgcolor" value="#ddeef6" />
                <embed src="/images/buttons/.swf" quality="high" bgcolor="#ddeef6" width="373" height="373" name="" align="middle" allowScriptAccess="sameDomain" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
                <!-- no_flash content -->
                    <a href="/button/push_the_button" data-method="post" onmousedown="disableButton();return false;" rel="nofollow"><img alt="Luckybutton" src="/images/slb/luckybutton.jpg?1286570555" /></a>
                <!-- end no_flash content -->
            </object>
        </noscript>
    </div>
    <div id="luckybutton_clicked" style="display:none">
        <img alt="Luckybutton" src="/images/slb/luckybutton.jpg?1286570555" />
    </div>
</div>

1 个答案:

答案 0 :(得分:0)

方式0:gotoandplay(11)可以直接做

<小时/> 如果你有闪光灯的来源
方式1:将变量传递给SWF并在闪存中检查变量
的值 方式2:移动鼠标并单击按钮:D使用 Moving mouse cursor programmatically