点击下载查看程序

代码:
<?xml version="1.0" encoding="utf-8"?>   
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"  
creationComplete
="init();"  
layout
="absolute" width="1024" height="768">   
  
<mx:Script>   
<![CDATA[   
// imports   
import flash.html.HTMLLoader;   
import flash.net.URLRequest;   
import mx.core.UIComponent;   
  
// called on creationComplete   
public function init():void   
{   
var htmlLoader:HTMLLoader = new HTMLLoader();   
var urlReq:URLRequest = new URLRequest("http://www.novologic.com");   
  
// HTMLLoader Class size defaults to 0,0 so you must size it.   
htmlLoader.width = 1024;   
htmlLoader.height = 768;   
  
// load URLRequest   
htmlLoader.load(urlReq);   
  
// Create UIComponent to add html object to   
var myComponent:UIComponent  = new UIComponent();   
myComponent.addChild(htmlLoader);   
  
// now add component to stage   
this.addChild(myComponent);   
}   
]]>   
</mx:Script>   
</mx:WindowedApplication>  

相关文章:

  • 2022-02-18
  • 2021-12-02
  • 2021-12-03
  • 2021-12-25
  • 2021-12-21
  • 2021-09-21
  • 2021-05-18
  • 2022-02-05
猜你喜欢
  • 2021-06-01
  • 2022-12-23
  • 2021-09-25
  • 2021-12-18
  • 2022-02-09
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案