2011-10-05 52 views
0

我试图将闪存对象的高度调整为分隔符的大小。 这实际上不起作用,所以这里有什么问题? Flash对象被显示,但它的高度只有100px。 我想稍后通过调用flash中的js-method并更改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> 

干杯 菲利克斯

回答

5

我不得不通过创建HTML拖动可调整大小的Flash对象,前一段时间,这是我的解决方案:

  • 我创建了%尺寸,flash对象e.g高度:100%;
  • 而我调整了Flash的HTML容器和Flash应该 遵循div的高度。

让我知道它是否适合你。

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

调整的div,它应该是罚款

+1

谢谢,这帮助。 我改变了宽度和高度属性的样式值,并将'px'添加到我的高度和宽度值(我认为这是问题)。 –

+0

很高兴我能帮到你。 :) –

+0

我注意到它不在IE上工作,对此有什么建议? –

0

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

Swffit(以前称为FitFlash)是自动调整您的Flash影片,如果你的浏览器窗口大小小于或更高的智能脚本您的闪存最小期望大小保持访问独立于屏幕分辨率。

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