여기에 내 질문에 답하십시오. "자바 스크립트의 전체 꽝은"한 말도 라인으로 요약 될 수있다 : 이것은 당신이하는 HTMLLoader를 사용하여로하는 NativeWindow 및 로딩 HTML을 사용하고 단 하나의 아이를로드하는 가정
var myWindow = air.NativeApplication.nativeApplication.openedWindows[intWindowCount].stage.getChildAt(0).window
myWindow.document.getElementById('status').innerHTML = "success";
. intWindowCount
은 열린 창 (Introspector 포함)의 수를 나타냅니다. 0
은 stage.addChild()
메서드를 사용하여 만든 자식 수를 나타냅니다. 내가 사용하고있는 코드는 그 전체가 아래에있다. 이 수행하는 최대 몇 가지 청소 가능성이 있지만, 같은 일을해야하는 사람을위한 좋은 출발점이되어야한다 : 끝
var htmlView = new air.HTMLLoader();
htmlView.width = 300;
htmlView.height = 500;
var objWindowOptions = new air.NativeWindowInitOptions();
objWindowOptions.transparent = false;
objWindowOptions.systemChrome = air.NativeWindowSystemChrome.STANDARD;
objWindowOptions.type= air.NativeWindowType.NORMAL;
var wWindow = new air.NativeWindow(objWindowOptions);
wWindow.x = objScreen.x;
wWindow.y = objScreen.y;
wWindow.width = objScreen.width;
wWindow.height = objScreen.height;
wWindow.activate();
wWindow.stage.align = "TL";
wWindow.stage.displayState = runtime.flash.display.StageDisplayState.FULL_SCREEN_INTERACTIVE;
wWindow.stage.scaleMode = "noScale";
wWindow.stage.addChild(htmlView);
htmlView.load(new air.URLRequest("pageTwo.html"));
setTimeout(function(){
objScreen.setWindowReference(air.NativeApplication.nativeApplication.openedWindows[intWindowCount].stage.getChildAt(0).window);
objScreen.setClock(cClock);
cClock.screen = objScreen;
},500);
시간 초과가 무서운 당황 해킹입니다. addEventListener()
과 함께 사용할 적절한 이벤트를 찾지 못했기 때문에 나는 그것을 사용하고 있습니다.