flex 使用iframe加载html 及实现思路

来源:互联网 发布:国内数据防泄漏产品 编辑:程序博客网 时间:2024/06/06 08:23

flex-iframe:http://code.google.com/p/flex-iframe/


使用方法很简单,下载flex-iframe把swc加到libs中 然后直接通过<IFrame>标签使用,如

<?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"   xmlns:code="http://code.google.com/p/flex-iframe/"><fx:Declarations><!-- Place non-visual elements (e.g., services, value objects) here --></fx:Declarations><code:IFrame source="http://www.baidu.com" width="100%" height="100%"></code:IFrame></s:Application>


实现思路:  在flash所在的html页中添加一个div层,这个层用于加载html,并将此层放置在flash上层遮住相应的flash组件区域,flash通过javascript与html交互。实现移动,放大等操作