swfObject问题 [英] Problem with swfObject

查看:121
本文介绍了swfObject问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,我目前正在使用C#在youtube播放器上工作,发现最简单的工作是制作一个html主页并将其放入C#网络浏览器中,然后使用invokescript调用javascript.一切正常,但是youtube video/swfObject有一个边框"女巫,实际上不是边框,但是它本身是主页,我想将swfObject/video一直移动到角落,我已经粘贴了一些代码在下面:

Hi every one, i am currently working on a youtube player in C# and found the easiest to make work is to make a html homepage and put it into a C# webbrowser, and call the javascript with invokescript. everything works fine but the youtube video/swfObject have a "border" witch really isn''t a border but the home page it self and i wanna have the swfObject/video moved all the way up to the corner i''ve paste some code here below:

</SCRIPT>
        <script type="text/javascript" src="scripts/swfobject.js">
        </script>
    </HEAD>

    <BODY bgcolor="Black">
        <FORM NAME="youtubeForm">
            <div id="ytplayer">
                <a href="javascript:void(0);" onclick="changePluginState();">Flash player 8+</a> and JavaScript enabled to view this video.
                <script type="text/javascript">
                    var params = { allowScriptAccess: "always" };
                    var atts = { id: "ytplayer" };
                    swfobject.embedSWF("http://www.youtube.com/apiplayer?version=3&amp;video_id=u1zgFlCw8Aw&amp;enablejsapi=1&amp;playerapiid=ytplayer", "ytplayer", "400", "300", "8", null, null, params, atts);
                </script>
            </div>
        </FORM>
    </BODY>
</HTML>


我不想添加css文件(如果我可以避免的话),并且我尝试向javascript/swfObject和div添加样式边距,但表单无济于事……所以有人有什么主意吗? swfObject.js是在Google api主页上获取的,标头主要只是具有用于控制youtube播放器的脚本,因此在设计时不会被导入.请帮助使设计看起来完美.

谢谢-杰基

我发现了一些如下所示的代码,但是我无法使其工作...


i dont wanna add a css file if i can avoid it, and i''ve tried to add style margin to both the javascript/swfObject and the div and the form nothing works... so does any one have any idea? the swfObject.js is picked up at google api homepage and the header mainly just have scripts to control the youtube player so that isn''t importen for the design. please help to make the design look perfectly.

Thanks - Jackie

i found some code as shown below but i cant make it work any how...

<style type="text/css" media="screen">
     { display:block; }
</style>

推荐答案

通过执行以下操作找到了解决方案:

found the solution by doing this:

<BODY bgcolor="Black" style="margin-left: 0px; margin-top: 0px; margin-bottom: 0px">



现在一切都很好:)



everything works great now :)


这篇关于swfObject问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆