查看文章 |
在Flex中嵌入完整HTML页面
2009-03-30 15:28
效果展示:http://www.deitte.com/IFrameDemo3/IFrameDemo.html
demo <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns="*" creationComplete="iFrame.visible=true" viewSourceURL="srcview/index.html"> <mx:HBox width="100%" height="100%"> <mx:Panel title="Tree" width="200" height="100%" roundedBottomCorners="true"> <mx:Tree id="tree" width="100%" height="100%" dataProvider="{treeData}" labelField="@label" showRoot="false" change="iFrame.source = (Tree(event.target).selectedItem.attribute('path').toString());" /> </mx:Panel> <mx:Panel width="100%" height="100%" title="Content" paddingTop="1" paddingBottom="1" paddingLeft="1" paddingRight="1" > <IFrame id="iFrame" source="http://www.adobe.com/devnet/flex/" width="100%" height="100%" /> <mx:ControlBar> <mx:CheckBox id="cbVisible" label="IFrame Visible" selected="true" click="iFrame.visible=cbVisible.selected"/> </mx:ControlBar> </mx:Panel> </mx:HBox> <mx:XMLList id="treeData"> <node label="Flex Resources"> <node label="Flex Developer Center" path="http://www.adobe.com/devnet/flex/" /> <node label="Flex Team Blog" path="http://weblogs.macromedia.com/flexteam/" /> <node label="Flex Blogs on MXNA" path="http://weblogs.macromedia.com/mxna/FeedList.cfm#Flex" /> <!-- these sites pop themselves out of a frame: <node label="flex.org" path="http://www.flex.org" /> <node label="Adobe Labs" path="http://labs.adobe.com/wiki/index.php/Main_Page" /> --> </node> <node label="Search"> <node label="Google" path="http://www.google.com" /> <node label="Yahoo" path="http://www.yahoo.com" /> </node> </mx:XMLList> </mx:Application> //IFrame
|
最近读者: