开发者

Resize Flash Object

开发者 https://www.devze.com 2023-04-11 09:47 出处:网络
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 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-me开发者_开发问答thod 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


I had to create a resizable flash object via html drag some time ago, this was my solution:

  • I created the flash object with % dimensions, e.g height:100%;
  • And I resized the flash html container and the flash should follow the div's height.

Let me know if it works for you.

EXAMPLE

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

Resize the div and it should be fine


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消