Flex IFrame内嵌网页


flex-iframe下载地址 https://github.com/flex-users/flex-iframe/downloads

直接在项目中引用  flex-iframe-1.5.1.swc

然后flex中引用
     <mx:TabNavigator width="100%" height="100%" selectedIndex="0">
          <ns:IFrame id="test1" 
                       label="Google1" 
                       source=" http://www.qq.com
                       width="100%" 
                       height="100%" 
                       /> 
          <ns:IFrame id="test2" 
                       label="Google2" 
                       source=" myHTML.html
                       width="100%" 
                       height="100%" 
                       /> 
     </mx:TabNavigator>

你会发现红色部分http://www.qq.com能引用到qq首页的网页,但是蓝色部分myHTML.html却不能引用到
自己的网页。
Iframe是这样处理的。有AC_OETags.js这样文件引用
Flex IFrame内嵌网页
index.template.html文件用下载的例子中的同名文件。这样就能直接调用成功了。
但是一般呢,我们这种都是放在服务器端的,所以在服务器端时即使不添加AC_OETags.js和修改index.template.html文件都是没事的。
至于为何有待看它源码!

你可能感兴趣的:(Flex)