调整 Flash 对象的大小
我试图将 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>
干杯 菲利克斯
i trying to resize the height of a flash object to the size of a divider.
This actually does not work, so what's wrong here? The flash object is displayed, but it's height is only 100px.
I want to resize the movie later by calling the js-method from flash and change the size of the div object.
<%@ 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>
Cheers
Felix
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
前段时间我必须通过 html 拖动创建一个可调整大小的 Flash 对象,这是我的解决方案:
遵循 div 的高度。
让我知道它是否适合您。
示例
调整
div
的大小,应该没问题I had to create a resizable flash object via html drag some time ago, this was my solution:
follow the div's height.
Let me know if it works for you.
EXAMPLE
Resize the
div
and it should be fine看看 http://swffit.millermedeiros.com/
Swffit(以前称为 FitFlash)是一个智能如果您的浏览器窗口大小小于或大于 Flash 所需的最小大小,该脚本会自动调整 Flash 影片的大小,从而保持其可访问性,不受屏幕分辨率的影响。
它似乎有很多功能,包括调整事件大小。
Take a look at http://swffit.millermedeiros.com/
Swffit (formerly know as FitFlash) is a smart script that resizes your flash movie automatically if your browser window size is smaller or greater than your flash minimum desired size keeping it accessible independent of screen resolution.
It seems to have a lot of features, including resize events.