shikonglaike 发表于 2013-2-6 10:08:08

flex嵌入html和jsp

我们使用Google提供的iframe让jsp页面嵌入到flex中
首先,请到http://code.google.com/p/flex-iframe/下载iframe 的swc包
第二步,把swc包放入flex_libs中,如果不是web项目就放入lib下
第三步,创建一个mxml文件
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:code="http://code.google.com/p/flex-iframe/" width="100%" height="100%">
 
 <mx:HDividedBox x="0" y="10" width="100%" height="100%">
  <mx:Panel width="30%" height="100%" layout="absolute">
   <code:IFrame id="frm2" source="/flexPage/import.jsp" height="100%" width="100%"/>
  </mx:Panel>
  <mx:Panel width="70%" height="100%" layout="absolute">
   <code:IFrame id="frm" source="/flexPage/wnl.html" height="100%" width="100%"/>
  </mx:Panel>
 </mx:HDividedBox>
</mx:Application>
页: [1]
查看完整版本: flex嵌入html和jsp