=================================
=================================
=================================
출처: http://powerfl.com/?p=1323
//위의 출처에서 간단히 실행되는 부분만 적어 두었다.
import flash.display.Shape;
import flash.display.Sprite;
import flash.display.StageAlign;
import flash.display.StageScaleMode;
import flash.events.Event;
import flash.events.LocationChangeEvent;
import flash.events.MouseEvent;
import flash.geom.Rectangle;
import flash.media.StageWebView;
public class SimpleBrowser extends Sprite
{
private var _webView:StageWebView;
//private var _backBtn:PushButton;
//private var _forwardBtn:PushButton;
//private var _goBtn:PushButton;
//private var _urlInput:InputText;
//private var _preloader:CircleSlicePreloader;
public function SimpleBrowser()
{
super();
if ( stage ) {
init();
} else {
addEventListener(Event.ADDED_TO_STAGE, init);
}
}
final private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
stage.align = StageAlign.TOP_LEFT;
stage.scaleMode = StageScaleMode.NO_SCALE;
makeLayout();
}
final private function makeLayout():void
{
var rect:Shape = new Shape;
rect.graphics.beginFill(0xEEEEEE);
rect.graphics.drawRect(0, 0, 320, 40);
rect.graphics.endFill();
addChild(rect);
_webView = new StageWebView;
_webView.stage = this.stage;
_webView.viewPort = new Rectangle( 0, 40, 320, 440 );
_webView.addEventListener(Event.COMPLETE, handleWebView);
_webView.addEventListener(LocationChangeEvent.LOCATION_CHANGE, handleWebView);
_webView.addEventListener(LocationChangeEvent.LOCATION_CHANGING, handleWebView);
_webView.loadURL( "http://www.naver.com" );
}//end makeLayout
}
=================================
=================================
=================================
기타 참고링크:
http://help.adobe.com/ko_KR/FlashPlatform/reference/actionscript/3/flash/media/StageWebView.html
=================================
=================================
=================================
'ADOBE > ActionScript' 카테고리의 다른 글
[AS] 플래시 AS3.0 폰트 가져와서 쓰기 (0) | 2012.01.16 |
---|---|
플래시 액션스크립트 키코드 (0) | 2012.01.11 |
[AS] 플래시 AS3.0 AIR 삼성TV SDK 에뮬레이터, TV 구동관련 (0) | 2012.01.09 |
플래시 AS3.0 색깔을 낼수있는 기본 컨트롤 영역 클래스 만들기 (0) | 2012.01.09 |
플래시 AS3.0(AIR) SQLite 연동 관련 ~ (0) | 2012.01.09 |