flex中嵌入网页

Flex中嵌入网页

需要下载第三方组件flex-iframe

下载地址:http://code.google.com/p/flex-iframe/

 

把flex-iframe-1.x.x.swc文件复制到libs文件夹,使用的话,非常简单,下面是一个简单的例子:

?

<?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:iframe="http://code.google.com/p/flex-iframe/">

    <s:layout>

        <s:BasicLayout/>

    </s:layout>

    <fx:Declarations>

        <!-- 将非可视元素(例如服务、值对象)放在此处 -->

    </fx:Declarations>

      

    <mx:Panel height="100%" width="100%" layout="absolute">

        <iframe:IFrame source="http://www.sina.com.cn/" width="100%" height="100%" x="43" y="36">

        </iframe:IFrame>

    </mx:Panel>

</s:Application>

 

你可能感兴趣的:(flex中嵌入网页)