Flex IFrame控制項

來源:互聯網
上載者:User

  如何在Flex頁面中實現HTML裡面的IFrame功能,下面有個很簡單的方法。

步驟:

1、在此連結中下載現成的資料 https://github.com/flex-users/flex-iframe/downloads

我下的是最新的 flex-iframe-1.5.1.zip

解壓後,在 flex-iframe-1.5.1\sources\library\flex-iframe\src\com\google\code\flexiframe  這個路徑中可以找到兩個AcriptScript 類檔案

2、將IFrame.as、IFrameExternalCalls.as  存放在Flex項目中,我將它複製到Class檔案裡

3、建立立 MXML應用程式,添加紅色部分代碼即可, source裡填充要顯示的頁面

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:flexiframe="http://code.google.com/p/flex-iframe/"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
      xmlns:iframe="Class.*">
 <fx:Declarations>
  <!-- 將非可視元素(例如服務、值對象)放在此處 -->
 </fx:Declarations>
 <iframe:IFrame id="iFrame" source="http://www.baidu.com/" width="100%" height="100%"/>
</s:Application>

 

相關文章:http://hi.baidu.com/%D5%D4%B9%A7%DC%F8/blog/item/3c15728f0b5a22709e2fb4d1.html

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.