gpt4 book ai didi

html - 如何让 swf 的高度随内容展开?

转载 作者:太空宇宙 更新时间:2023-11-04 15:42:18 25 4
gpt4 key购买 nike

我正在 Flash 中创建一个站点,该站点正在从数据库中读取条目。我希望 swf 在 html 页面上向下扩展,以便用户可以使用浏览器滚动条查看所有内容。我不想将所有内容分页到 800 像素高的 swf 或其他内容中 - 我希望页面像 html 一样展开。可能吗?

最佳答案

我们在私有(private)项目中就是这么做的。我们有一个使用 ExternalInterface.call ( http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html ) 的函数:

if (ExternalInterface.available) ExternalInterface.call('resizeScene', newHeight)

调用一个简单调整 div 元素大小的 javascript 函数:

function resizeScene(newHeight)
{
document.getElementById('website').style.height = parseFloat(newHeight) + 'px';
}

您可能还想调查一下

http://livedocs.adobe.com/flex/3/langref/flash/display/Stage.html#align

http://livedocs.adobe.com/flex/3/langref/flash/display/Stage.html#scaleMode

关于html - 如何让 swf 的高度随内容展开?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1705143/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com