【问题标题】:Resize Flash Object调整 Flash 对象的大小
【发布时间】:2011-12-01 08:13:20
【问题描述】:

我试图将 Flash 对象的高度调整为分隔线的大小。 这实际上不起作用,那么这里有什么问题? flash 对象显示出来了,但它的高度只有 100px。 我想稍后通过从 flash 中调用 js 方法来调整电影的大小并更改 div 对象的大小。

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="Website.Pages.Index" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div align="center">
            <div id="contentDivider" style="width:780;height:600;">
                <object width="780" height="100%">
                  <embed src="../content/Home.swf" type="application/x-shockwave-flash" width="780" height="100%" allowScriptAccess="sameDomain" pluginspage="http://get.adobe.com/de/flashplayer/"></embed>
                </object>
            </div>
        </div>
    </form>
    <script language="javascript" type="text/javascript">
        function setFlashHeight(height) {
            contentDivider.style.height = height;
        }
    </script>
</body>
</html>

干杯 费利克斯

【问题讨论】:

    标签: html flash resize embed


    【解决方案1】:

    前段时间我不得不通过 h​​tml drag 创建一个可调整大小的 flash 对象,这是我的解决方案:

    • 我创建了具有 % 尺寸的 flash 对象,例如 height:100%;
    • 我调整了 flash html 容器的大小,flash 应该 跟随 div 的高度。

    让我知道它是否适合你。

    示例

    <div style="height:500px;">
    <object style='height:100%;'><embed/></object>
    </div>
    

    调整div的大小应该没问题

    【讨论】:

    • 谢谢,有帮助。我将宽度和高度属性更改为样式值,并将“px”添加到我的高度和宽度值(我认为这是问题所在)。
    • 我注意到它在 IE 上不起作用,有什么建议吗?
    • 这很奇怪。我的正在跨浏览器工作。检查您的文档类型,并重新检查您的 html/css。
    【解决方案2】:

    看看http://swffit.millermedeiros.com/

    Swffit(以前称为 FitFlash)是一个智能脚本,如果您的浏览器窗口大小小于或大于您的 Flash 最小所需大小,它会自动调整您的 Flash 电影的大小,使其不受屏幕分辨率的影响。

    它似乎有很多功能,包括调整事件大小。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-06-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多