如何制作可点击的Flash视频或通过单击 asp.net 中的Flash视频打开URL



我有flash对象(视频(。我想在单击它时打开一个页面。我已经通过将其放入div 并在单击div 时打开页面来完成。但它在 chrome 和 IE 中不起作用。它在火狐中工作正常。我的代码如下:

<div class="HouseImage" onclick="window.open('Contact','_self')" style="height: 300px;
                overflow: hidden;">
                <object id="FlashID" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="351"
                    height="332">
                    <param name="movie" value="Flash/Banner.swf" />
                    <param name="quality" value="high" />
                    <param name="wmode" value="opaque" />
                    <param name="swfversion" value="6.0.65.0" />
                    <!-- This param tag prompts users with Flash Player 6.0 r65 and higher to download the latest version of Flash Player. Delete it if you don’t want users to see the prompt. -->
                    <param name="expressinstall" value="Scripts/expressInstall.swf" />
                    <!-- Next object tag is for non-IE browsers. So hide it from IE using IECC. -->
                    <!--[if !IE]>-->
                    <object type="application/x-shockwave-flash" data="Flash/Banner.swf" width="351"
                        height="332">
                        <!--<![endif]-->
                        <param name="quality" value="high" />
                        <param name="wmode" value="opaque" />
                        <param name="swfversion" value="6.0.65.0" />
                        <param name="expressinstall" value="Scripts/expressInstall.swf" />
                        <!-- The browser displays the following alternative content for users with Flash Player 6.0 and older. -->
                        <div>
                            <h4>
                                Content on this page requires a newer version of Adobe Flash Player.</h4>
                            <p>
                                <a href="http://www.adobe.com/go/getflashplayer">
                                    <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif"
                                        alt="Get Adobe Flash player" width="112" height="33" /></a></p>
                        </div>
                        <!--[if !IE]>-->
                    </object>
                    <!--<![endif]-->
                </object>
            </div>

请尽快帮助我。提前谢谢。

最好的方法是通过闪存打开链接。如果您无法访问代码,则可以编写"特殊"Flash 加载程序,它将在自身内部加载 Flash/Banner.swf,并具有 onclick 事件来加载页面。

您也可以尝试将透明div或gif放在flash动画上方,但是涉及绝对定位是一团糟,并且可能不适用于所有浏览器。

最新更新