我正在尝试在弹出窗口中打开的 iFrame 中加载 pdf。弹出窗口正在显示,但未加载 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);
}
现在 Window.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"/>
你能建议它有什么问题吗?