본문 바로가기
developer/java/javascript

ActiveX 위에 다른 Component 올리는 방법

by 모.서리 2012. 3. 5.

1.간략설명
--------------------------------------------------------------------------------
ActiveX 위에 다른 Component 올리는 샘플입니다.


2. 상세설명
--------------------------------------------------------------------------------
flash, XChart 등의 컴포넌트 위에 다른 grid, div등의 컴포넌트를 올리는 방법입니다.



3. 소스코드
--------------------------------------------------------------------------------
소스코드는 아래와 같습니다.


function testAXZorder_onload(obj:Form, e:LoadEventInfo)
{
 var s = this.skin = new ChildFrame();
 var l = system.clientToScreenX(ActiveX00,0);
 var t = system.clientToScreenY(ActiveX00,0);
 var r = l + ActiveX00.position.width;
 var b = t + ActiveX00.position.height;
 s.init("z",l,t,r,b,"Base::testZorder2.xfdl");
 s.resizable = false;
 s.layered = true;
 s.autosize = false;
 s.style = "border:0 none; background:transparent;";
 s.showtitlebar = false;
 s.showstatusbar = false;
 s.showontaskbar = false;
 s.showModeless(this.getOwnerFrame());
 ActiveX00.Navigate("http://maps.google.co.kr/");
 
 var realWin = this.getOwnerFrame();
 if ( popupframes[realWin.name] ) {
  s.gapW = this.getOwnerFrame().position.left - l;
  s.gapH = this.getOwnerFrame().position.top - t;
  realWin.onmove.setHandler(frame_onmove);
 }
 else {
  while ( realWin ) {
   if ( realWin instanceof MainFrame ) break;
   realWin = realWin.parent;
  }
  s.gapW = realWin.position.left - l;
  s.gapH = realWin.position.top - t;
  realWin.onmove.setHandler(frame_onmove);  
 }
 
}


function frame_onmove(obj, e:MoveEventInfo)
{
 
 if ( this.skin ) {
  this.skin.move(e.x - this.skin.gapW,e.y - this.skin.gapH);
 }
}

'developer > java/javascript' 카테고리의 다른 글

그리드 콤보내용을 클릭 한번으로 펼치는 방법  (0) 2012.03.05
줄바꿈  (0) 2012.03.05
showModal & showModeless  (0) 2011.04.19
키보드 값 리스트  (0) 2011.03.23
자바스크립트 연산자  (0) 2011.03.23