gpt4 book ai didi

actionscript-3 - iFrame 未在 Flex 弹出窗口内加载

转载 作者:行者123 更新时间:2023-12-02 16:04:51 26 4
gpt4 key购买 nike

我正在尝试在 iFrame 中加载 pdf,该 iFrame 在弹出窗口中打开。弹出窗口已显示,但未加载 pdf。这是我的代码 -Main.mxml

 <![CDATA[
import mx.controls.Alert;
import mx.events.FlexEvent;
import com.google.code.flexiframe.IFrame;
import mx.managers.PopUpManager;

protected function dgGrid_itemDoubleClick(event:Event):void {
var win : Window = new Window();
PopUpManager.addPopUp(win,this,true);
PopUpManager.centerPopUp(win);
}

现在窗口.mxml

       <?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical" width="742" height="452"
title="PopUp Window" horizontalAlign="center"
xmlns:flexiframe="http://code.google.com/p/flex-iframe/"
xmlns:components="components.*"
showCloseButton="true"
close="closeWindow(event);" >

<mx:Script>
<![CDATA[

import mx.core.IFlexDisplayObject;
import mx.events.CloseEvent;
import mx.managers.PopUpManager;

private function closeWindow(e:CloseEvent):void {
PopUpManager.removePopUp(e.target as IFlexDisplayObject);
}
]]>
</mx:Script>
<flexiframe:IFrame id="iframe" source="C:\\test.pdf"
backgroundColor="blue" width="100%" height="100%" visible="true"/>

你能建议一下它有什么问题吗?

最佳答案

您需要转到 index.template.html 文件并将以下参数放入 SWF 中:

params.wmode= "opaque";

请记住,虽然此设置可以解决 IFrame 的许多问题,但它确实会导致某些 Flash 版本和浏览器出现性能问题。使用 IFrame 的风险由您自行承担。

关于actionscript-3 - iFrame 未在 Flex 弹出窗口内加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16600521/

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