标签:mod this listener nat browser port location false sys
package { import flash.display.MovieClip; import flash.html.HTMLLoader; import flash.net.URLRequest; import fl.core.UIComponent; import flash.display.StageScaleMode; import flash.display.StageAlign; import flash.display.StageQuality; import flash.display.NativeWindowInitOptions; import flash.events.LocationChangeEvent; import flash.events.MouseEvent; import flash.geom.Rectangle; public class htmlload extends MovieClip { var htmlLoader:HTMLLoader = new HTMLLoader(); public function htmlload() { //Stage.scaleMode = "noScale"; stage.scaleMode = StageScaleMode.NO_SCALE stage.align = StageAlign.TOP_LEFT; stage.quality = StageQuality.BEST; init(); } public function init():void { var urlReq:URLRequest = new URLRequest("http://www.baidu.com"); htmlLoader.width = 1280; htmlLoader.height = 960; //htmlLoader.paintsDefaultBackground = false; htmlLoader.load(urlReq); htmlLoader.addEventListener( LocationChangeEvent.LOCATION_CHANGING, onLocationChanging ); htmlLoader.addEventListener( LocationChangeEvent.LOCATION_CHANGE, onLocationChang); //htmlLoader.navigateInSystemBrowser = true; var myComponent:UIComponent = new UIComponent(); myComponent.addChild(htmlLoader); this.addChild(myComponent); } private function onLocationChanging( event:LocationChangeEvent ):void { trace( "Location changing: " + event.location ); } private function onLocationChang( event:LocationChangeEvent ):void { trace( "Location chang: " + event.location ); } } }
标签:mod this listener nat browser port location false sys
原文地址:https://www.cnblogs.com/dt1991/p/14875465.html