主界面:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
<fx:Script>
<![CDATA[
import dialog.FlexWindow;
import mx.managers.PopUpManager;
protected function button1_clickHandler(event:MouseEvent):void
{
var win:FlexWindow=(FlexWindow)(PopUpManager.createPopUp(this,FlexWindow,true));
win.title="百度";
win.width=1000;
win.height=600;
PopUpManager.centerPopUp(win);
}
]]>
</fx:Script>
<fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
</fx:Declarations>
<s:Button label="点击我" click="button1_clickHandler(event)">
</s:Button>
</s:Application>
弹窗口界面:
<?xml version="1.0" encoding="utf-8"?>
<s:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
move="titlewindow1_moveHandler(event)"
width="100%" height="100%" close="titlewindow1_closeHandler(event)" xmlns:ns="http://code.google.com/p/flex-iframe/" xmlns:flexiframe="com.google.code.flexiframe.*">
<fx:Script>
<![CDATA[
import mx.events.CloseEvent;
import mx.events.MoveEvent;
import mx.managers.PopUpManager;
protected function titlewindow1_closeHandler(event:CloseEvent):void
{
PopUpManager.removePopUp(this);
}
protected function titlewindow1_moveHandler(event:MoveEvent):void
{
iFrame.invalidateDisplayList();
}
]]>
</fx:Script>
<fx:Declarations>
<!-- 将非可视元素(例如服务、值对象)放在此处 -->
</fx:Declarations>
<flexiframe:IFrame id="iFrame" source="http://www.baidu.com" width="100%" height="100%" />
</s:TitleWindow>
IFrame下载地址
http://pan.baidu.com/s/1nafrK